Compare commits
2 Commits
ca259c5f24
...
71343d6742
Author | SHA1 | Date | |
---|---|---|---|
71343d6742 | |||
3f6e558d39 |
24230
package-lock.json
generated
24230
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -1,5 +1,8 @@
|
||||
import { createLogger, format, transports } from "winston"
|
||||
import { config } from "./configuration"
|
||||
import { v4 } from "uuid"
|
||||
export function newRequestId() { return v4() }
|
||||
export const noGuildId = 'NoGuildId'
|
||||
|
||||
|
||||
const printFn = format.printf(({ guildId, level, message, errorCode, requestId, timestamp: logTimestamp }: { [k: string]: string }) => {
|
||||
@ -13,7 +16,8 @@ const logFormat = format.combine(
|
||||
|
||||
const consoleTransports = [
|
||||
new transports.Console({
|
||||
format: logFormat
|
||||
format: logFormat,
|
||||
silent: process.env.NODE_ENV === 'testing'
|
||||
})
|
||||
]
|
||||
export const logger = createLogger({
|
||||
|
Loading…
Reference in New Issue
Block a user