MCPcopy
hub / github.com/virattt/dexter / add

Method add

src/utils/logger.ts:22–35  ·  view source on GitHub ↗
(level: LogLevel, message: string, data?: unknown)

Source from the content-addressed store, hash-verified

20 }
21
22 private add(level: LogLevel, message: string, data?: unknown) {
23 const entry: LogEntry = {
24 id: `${Date.now()}-${Math.random().toString(36).slice(2, 9)}`,
25 level,
26 message,
27 timestamp: new Date(),
28 data,
29 };
30 this.logs.push(entry);
31 if (this.logs.length > this.maxLogs) {
32 this.logs = this.logs.slice(-this.maxLogs);
33 }
34 this.emit();
35 }
36
37 debug(message: string, data?: unknown) {
38 this.add('debug', message, data);

Callers 15

debugMethod · 0.95
infoMethod · 0.95
warnMethod · 0.95
errorMethod · 0.95
runCliFunction · 0.45
searchTweetsFunction · 0.45
toggleOptionMethod · 0.45
openOtherMethod · 0.45
subscribeFunction · 0.45
allFunction · 0.45
enforceResultBudgetFunction · 0.45
subscribeMethod · 0.45

Calls 1

emitMethod · 0.95

Tested by

no test coverage detected