Method
constructor
(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
Tested by
no test coverage detected