Remove minimum log level

This commit is contained in:
Andras Schmelczer 2025-03-20 20:59:49 +00:00
commit e6563c99b0
No known key found for this signature in database
GPG key ID: FC8F2C3D3D1A718C

View file

@ -1,7 +1,7 @@
import type { WorkspaceLeaf } from "obsidian";
import { ItemView } from "obsidian";
import type VaultLinkPlugin from "../vault-link-plugin";
import type { SyncClient } from "sync-client";
import { LogLevel, type SyncClient } from "sync-client";
export class LogsView extends ItemView {
public static readonly TYPE = "logs-view";
@ -17,12 +17,6 @@ export class LogsView extends ItemView {
this.client.logger.addOnMessageListener(() => {
this.updateView();
});
this.client.addOnSettingsChangeHandlers((newSettings, oldSettings) => {
if (newSettings.minimumLogLevel !== oldSettings.minimumLogLevel) {
this.updateView();
}
});
}
private static formatTimestamp(timestamp: Date): string {
@ -77,9 +71,7 @@ export class LogsView extends ItemView {
}
);
const logs = this.client.logger.getMessages(
this.client.getSettings().minimumLogLevel
);
const logs = this.client.logger.getMessages(LogLevel.DEBUG);
if (logs.length === 0) {
container.createEl("p", { text: "No logs available yet." });