Skip to content

Instantly share code, notes, and snippets.

@flleeppyy
Created July 17, 2025 21:28
Show Gist options
  • Save flleeppyy/8e51fc971074e2a9de95c6c6cfec2a17 to your computer and use it in GitHub Desktop.
Save flleeppyy/8e51fc971074e2a9de95c6c6cfec2a17 to your computer and use it in GitHub Desktop.
Winston Pino pretty transport compat
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