diff --git a/src/debugMode.ts b/src/debugMode.ts index e74776a..bc43a5a 100644 --- a/src/debugMode.ts +++ b/src/debugMode.ts @@ -1,10 +1,7 @@ import { TAbstractFile, TFolder, TFile, Vault } from "obsidian"; import type { SyncPlanType } from "./sync"; -import { - readAllSyncPlanRecordTextsByVault, - readAllLogRecordTextsByVault, -} from "./localdb"; +import { readAllSyncPlanRecordTextsByVault } from "./localdb"; import type { InternalDBs } from "./localdb"; import { mkdirpInVault } from "./misc"; import { diff --git a/src/localdb.ts b/src/localdb.ts index 9ee4db2..bea4029 100644 --- a/src/localdb.ts +++ b/src/localdb.ts @@ -649,31 +649,6 @@ export const clearExpiredSyncPlanRecords = async (db: InternalDBs) => { await Promise.all(ps); }; -export const readAllLogRecordTextsByVault = async ( - db: InternalDBs, - vaultRandomID: string -) => { - const records = [] as { ts: number; r: string }[]; - await db.loggerOutputTbl.iterate((value, key, iterationNumber) => { - if (key.startsWith(`${vaultRandomID}\t`)) { - const item = { - ts: parseInt(key.split("\t")[1]), - r: value as string, - }; - records.push(item); - } - }); - - // while reading the logs, we want it to be ascending - records.sort((a, b) => a.ts - b.ts); - - if (records === undefined) { - return [] as string[]; - } else { - return records.map((x) => x.r); - } -}; - export const clearAllLoggerOutputRecords = async (db: InternalDBs) => { await db.loggerOutputTbl.clear(); log.debug(`successfully clearAllLoggerOutputRecords`);