Implements ILog
Log adapter with pluggable storage backend.
Features:
constructor();
_log: any
Internal log utils instance
getList: () => Promise<ILogEntry[]>
Lists all stored log entries. Proxies call to the underlying log adapter.
log: (topic: string, ...args: any[]) => void
Logs a general-purpose message. Proxies call to the underlying log adapter.
debug: (topic: string, ...args: any[]) => void
Logs a debug-level message. Proxies call to the underlying log adapter.
info: (topic: string, ...args: any[]) => void
Logs an info-level message. Proxies call to the underlying log adapter.
warn: (topic: string, ...args: any[]) => void
Logs a warning-level message. Proxies call to the underlying log adapter.
useLogger: (Ctor: TLogCtor) => void
Sets the log adapter constructor. All future log operations will use this adapter.
usePersist: () => void
Switches to persistent log adapter. Log entries will be persisted to disk.
useMemory: () => void
Switches to in-memory log adapter (default). Log entries will be stored in memory only.
useDummy: () => void
Switches to dummy log adapter. All future log writes will be no-ops.
useJsonl: (fileName?: string, dirName?: string) => void
Switches to JSONL file log adapter. Log entries will be appended to {dirName}/{fileName}.jsonl. Reads are performed by parsing all lines from the file.