Increase log dump to 500, dump everything in there (#2268)
parent
fedb94dd70
commit
987c543727
|
@ -287,15 +287,11 @@ export class Logger {
|
||||||
metadata: Metadata = {},
|
metadata: Metadata = {},
|
||||||
) {
|
) {
|
||||||
if (!this.enabled) return
|
if (!this.enabled) return
|
||||||
if (!enabledLogLevels[this.level].includes(level)) return
|
|
||||||
|
|
||||||
const timestamp = Date.now()
|
const timestamp = Date.now()
|
||||||
const meta = metadata || {}
|
const meta = metadata || {}
|
||||||
|
|
||||||
for (const transport of this.transports) {
|
// send every log to syslog
|
||||||
transport(level, message, meta, timestamp)
|
|
||||||
}
|
|
||||||
|
|
||||||
add({
|
add({
|
||||||
id: nanoid(),
|
id: nanoid(),
|
||||||
timestamp,
|
timestamp,
|
||||||
|
@ -303,6 +299,12 @@ export class Logger {
|
||||||
message,
|
message,
|
||||||
metadata: meta,
|
metadata: meta,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
if (!enabledLogLevels[this.level].includes(level)) return
|
||||||
|
|
||||||
|
for (const transport of this.transports) {
|
||||||
|
transport(level, message, meta, timestamp)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@ let entries: ConsoleTransportEntry[] = []
|
||||||
|
|
||||||
export function add(entry: ConsoleTransportEntry) {
|
export function add(entry: ConsoleTransportEntry) {
|
||||||
entries.unshift(entry)
|
entries.unshift(entry)
|
||||||
entries = entries.slice(0, 50)
|
entries = entries.slice(0, 500)
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getEntries() {
|
export function getEntries() {
|
||||||
|
|
Loading…
Reference in New Issue