0.24.0.dev-rc5

This commit is contained in:
vorotamoroz
2024-10-21 09:47:09 +01:00
parent e0e0ab0426
commit 6d244a6e34
9 changed files with 350 additions and 257 deletions

View File

@@ -1,5 +1,6 @@
import { Logger } from "octagonal-wheels/common/logger";
import { getPath } from "../common/utils.ts";
import { type AnyEntry, type DocumentID, type EntryHasPath, type FilePath, type FilePathWithPrefix } from "../lib/src/common/types.ts";
import { LOG_LEVEL_INFO, LOG_LEVEL_NOTICE, type AnyEntry, type DocumentID, type EntryHasPath, type FilePath, type FilePathWithPrefix, type LOG_LEVEL } from "../lib/src/common/types.ts";
import type ObsidianLiveSyncPlugin from "../main.ts";
@@ -40,4 +41,12 @@ export abstract class LiveSyncCommands {
_isDatabaseReady() {
return this.plugin._isDatabaseReady();
}
_log = (msg: any, level: LOG_LEVEL = LOG_LEVEL_INFO, key?: string) => {
if (typeof msg === "string" && level !== LOG_LEVEL_NOTICE) {
msg = `[${this.constructor.name}]\u{200A} ${msg}`;
}
// console.log(msg);
Logger(msg, level, key);
};
}