winston v3.0.0-rc0 Release Notes
Release Date: 2017-10-02 // over 6 years ago-
IT'S-DONE.GIF EDITION
⬆️ See [UPGRADE-3.0.md](UPGRADE-3.0.md) for a complete & living upgrade guide.
👀 See [3.0.0.md](3.0.0.md) for a list of remaining RC tasks.
- 🌲 Rewrite of core logging internals:
Logger
&Transport
are now implemented using Node.jsobjectMode
streams. - Your transports should not break: Special attention has been given to ensure backwards compatibility with existing transports. You will likely see this:
YourTransport is a legacy winston transport. Consider upgrading to winston@3: - Upgrade docs: https://github.com/winstonjs/winston/tree/master/UPGRADE.md
- 🌲
filters
,rewriters
, andcommon.log
are now formats:winston.format
offers a simple mechanism for user-land formatting & style features. The organic & frankly messy growth ofcommon.log
is of the past; these feature requests can be implemented entirely outside ofwinston
itself. ``` js const { createLogger, format, transports } = require('winston'); const { combine, timestamp, label, printf } = format;
const myFormat = printf(info => { return
${info.timestamp} [${info.label}] ${info.level}: ${info.message}
; });const logger = createLogger({ combine( label({ label: 'right meow!' }), timestamp(), myFormat ), transports: [new transports.Console()] });
- **Increased modularity:** several subsystems are now stand-alone packages: - [logform] exposed as `winston.format` - [winston-transport] exposed as `winston.Transport` - [abstract-winston-transport] used for reusable unit test suites for transport authors. - 🚧 **`2.x` branch will get little to no maintenance:** no feature requests will be accepted – only a limited number of open PRs will be merged. Hoping the [significant performance benefits][perf-bench] incentivizes folks to upgrade quickly. Don't agree? Say something! - 👍 **No guaranteed support for `node@4` or below:** all code will be migrated to ES6 over time. This release was started when ES5 was still a hard requirement due to the current LTS needs.
- 🌲 Rewrite of core logging internals: