Created
July 17, 2025 21:28
-
-
Save flleeppyy/8e51fc971074e2a9de95c6c6cfec2a17 to your computer and use it in GitHub Desktop.
Winston Pino pretty transport compat
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import winston from "winston"; | |
import pinoPretty from "pino-pretty"; | |
new winston.transports.Stream({ | |
stream: pinoPretty({ | |
colorize: true, | |
translateTime: "yyyy-mm-dd HH:MM:ss", | |
timestampKey: "timestamp", | |
messageKey: "message", | |
}), | |
format: winston.format.combine(winston.format.timestamp(), winston.format.json()), | |
}), |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment