Remove minimum log level
This commit is contained in:
parent
b00b9521c6
commit
e6563c99b0
1 changed files with 2 additions and 40 deletions
|
|
@ -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." });
|
||||
|
|
|
|||
Loading…
Reference in a new issue