Increase log dump to 500, dump everything in there (#2268)

zio/stable
Eric Bailey 2023-12-21 16:43:57 -06:00 committed by GitHub
parent fedb94dd70
commit 987c543727
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 6 deletions

View File

@ -287,15 +287,11 @@ export class Logger {
metadata: Metadata = {},
) {
if (!this.enabled) return
if (!enabledLogLevels[this.level].includes(level)) return
const timestamp = Date.now()
const meta = metadata || {}
for (const transport of this.transports) {
transport(level, message, meta, timestamp)
}
// send every log to syslog
add({
id: nanoid(),
timestamp,
@ -303,6 +299,12 @@ export class Logger {
message,
metadata: meta,
})
if (!enabledLogLevels[this.level].includes(level)) return
for (const transport of this.transports) {
transport(level, message, meta, timestamp)
}
}
}

View File

@ -4,7 +4,7 @@ let entries: ConsoleTransportEntry[] = []
export function add(entry: ConsoleTransportEntry) {
entries.unshift(entry)
entries = entries.slice(0, 50)
entries = entries.slice(0, 500)
}
export function getEntries() {