MCPcopy
hub / github.com/streetwriters/notesnook / constructor

Method constructor

packages/core/src/logger.ts:94–107  ·  view source on GitHub ↗
(private readonly db: Kysely<LogDatabaseSchema>)

Source from the content-addressed store, hash-verified

92 private hasCleared = false;
93
94 constructor(private readonly db: Kysely<LogDatabaseSchema>) {
95 setInterval(
96 () => {
97 setTimeout(() => {
98 if (!this.hasCleared) {
99 this.hasCleared = true;
100 this.rotate();
101 }
102 this.flush();
103 });
104 },
105 process.env.NODE_ENV === "test" ? 200 : 10000
106 );
107 }
108
109 push(message: LogMessage) {
110 const date = new Date(message.timestamp);

Callers

nothing calls this directly

Calls 2

rotateMethod · 0.95
flushMethod · 0.95

Tested by

no test coverage detected