Skip to content

Commit

Permalink
Add timestamp to log (#350)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhq745w authored Nov 19, 2024
1 parent 901526c commit d24a17b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/logger.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
import * as winston from "winston"

export const logger = winston.createLogger({
format: winston.format.combine(
winston.format.timestamp({ format: "YYYY-MM-DD HH:mm:ss" }),
winston.format.json()
),
levels: winston.config.syslog.levels,
transports: [ new winston.transports.Console() ],
})

0 comments on commit d24a17b

Please sign in to comment.