npm / winston
winston
What changed in winston 1 to 3, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-30.
45 breaking3 new APIs and options2 behavior and defaults6 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initwinston 345 changes
Breaking changes 39
Removed as a transport formatting option; use format.align().
Logger no longer performs automatic splat interpolation by default; use format.splat() to enable it.
Removed as a transport formatting option; use format.colorize().
Removed from Console transport options.
The default logger no longer includes Console transports; leaving it without transports may cause high memory usage.
Setting the default logger's level no longer sets the level on its transports.
The default output format is now format.json().
This option is provided to format.prettyPrint().
Removed as a Logger formatting option; use a custom format instead.
A new concept combines formatters and rewriters; custom formats can handle formatting without changes to winston core.
Set this to false on all transports when handling exceptions under the new behavior.
Now the default exception format.
Removed as a transport formatting option; use format.json().
Removed as a transport formatting option; use format.label().
Removed.
The transport option is removed; use the transport instance on the logger directly.
The transport option is removed; use the transport instance on the logger directly.
Removed as a transport formatting option; use format.logstash().
Removed as a transport formatting option; use format.json().
Removed as a Logger formatting option; use a custom format instead.
The option now defaults to an empty array.
Removed as a transport formatting option; use format.timestamp().
Formatting options previously configured on transports should now be set by adding the appropriate formatter.
No longer modifies transport state; it only adds or removes the uncaughtException process handler.
Removed; use winston-compat.
Removed.
Removed; use winston-compat.
Container instances no longer have default Console transports; having no transports may cause high memory usage.
No longer performs the previous options parsing.
Replaces winston.Logger construction; use it to create a logger.
Removed; use winston.ExceptionHandler().
Removed.
Constructing with new winston.Logger(opts) is removed; use winston.createLogger(opts).
No longer accepts transport prototypes or classes; pass a transport instance.
No longer accepts a callback; to wait for logging to complete, listen for finish and end the logger.
Removed.
Removed; levels are frozen when a Logger is created.
All log levels are sent to stdout by default.
Removed; use a Node.js writable stream with a large highWaterMark instead.
New APIs and options 1
Use this package when writing transports instead of winston.Transport.
Behavior and default changes 1
In winston 3, info objects are considered mutable.
Fixes and other changes 4
The File transport now flushes all data before emitting finish.
Error causes are now appended when using logger.child().
Adding the same transport twice no longer causes an error.
Logging with no transports no longer responds with an error.
winston 111 changes
Breaking changes 6
A logger instance is deleted from its Container when the close event is emitted.
The duration field is renamed to durationMs and is a number rather than a string ending in ms.
File transports emit an error when underlying streams fail after maxRetries attempts.
No default level is set; when a Transport level is falsey, a Logger uses its configured level instead.
File writing uses os.EOL by default.
Using colors no longer extends String prototypes as a side effect.
New APIs and options 2
The File transport supports showLevel.
The Console transport supports showLevel.
Behavior and default changes 1
Metadata is filtered along with messages.
Fixes and other changes 2
A minor issue with maxFiles in the File transport is fixed.
Rendering of stack traces is fixed.