Skip to content

Commit

Permalink
Add timestamp to log
Browse files Browse the repository at this point in the history
  • Loading branch information
zhq745w committed Nov 19, 2024
1 parent 901526c commit 576e844
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 A" }),
winston.format.json()
),
levels: winston.config.syslog.levels,
transports: [ new winston.transports.Console() ],
})

0 comments on commit 576e844

Please sign in to comment.