Repository URL to install this package:
|
Version:
1.1.0-1 ▾
|
diagnostics published to NPM to avoid git dependency.info.message and meta.message.child property on default logger.createLogger for level convenience methods (e.g. .info(), .silly()).
(Fixes [#1577]).NOTE: this was our first release using Github Projects. See the 3.2.0 Release Project.
new Error(string)
throughout the pipeline(s). (Fixes [#1338], [#1486]).warn events up to logger in
addition to errors.readable-stream using CRA.3.0.0)exitOnError.splat behaviorwinston and logform.SPLAT to formats (Fixes [#1485]).Previously splat would have added a meta property for any additional
info[SPLAT] beyond the expected number of tokens.
As of logform@2.0.0, format.splat assumes additional splat paramters
(aka "metas") are objects and merges enumerable properties into the info.
e.g. BE ADVISED previous "metas" that were not objects will very likely
lead to odd behavior. e.g.
const { createLogger, format, transports } = require('winston'); const { splat } = format; const { MESSAGE, LEVEL, SPLAT } = require('triple-beam'); const logger = createLogger({ format: format.combine( format.splat(), format.json() ), transports: [new transports.Console()] }); // Expects two tokens, but four splat parameters provided. logger.info( 'Let us %s for %j', // message 'objects', // used for %s { label: 'sure' }, // used for %j 'lol', ['ok', 'why'] // Multiple additional meta values ); // winston < 3.2.0 && logform@1.x behavior: // Added "meta" property. // // { level: 'info', // message: 'Let us objects for {"label":"sure"}', // meta: ['lol', ['ok', 'why']], // [Symbol(level)]: 'info', // [Symbol(message)]: 'Let us %s for %j', // [Symbol(splat)]: [ 'objects', { label: 'sure' } ] } // winston >= 3.2.0 && logform@2.x behavior: Enumerable properties // assigned into `info`. Since **strings and Arrays only have NUMERIC // enumerable properties we get this behavior!** // // { '0': 'ok', // '1': 'why', // '2': 'l', // level: 'info', // message: 'Let us objects for {"label":"sure"}', // [Symbol(level)]: 'info', // [Symbol(message)]: 'Let us %s for %j', // [Symbol(splat)]: [ 'objects', { label: 'sure' } ] }
README.md for awaiting logs.ConsoleTransportOptions interface type definition.child() method.readable-stream to v3.0.6.@types/node, nyc, and through2.consoleWarnLevels property to console transport options for console.warn browser support.tailing: true (Fixes [#1450], [#1194]).isLevelEnabled(string) & isXXXEnabled() to Logger class.package-lock.json.colors@^1.3.2 (Fixes [#1439]).logform@^1.9.1.diagnostics@^1.1.1.@types/node@^10.9.3.assume@^2.1.0.hock@^1.3.3.mocha@^5.2.0.nyc@^13.0.1.split2@^3.0.0._final from Node.js streams. (Related to winston-transport#24, Fixes [#1250]).format.transform with try / catch (Fixes [#1261]).colorize
to address concerns in [#1095].docs/transports.md.package-lock.json.logform@^1.9.0.winston@3.0.0File transport core functionality. Fixes [#1194].eol option to Stream transport.winston.config to triple-beam. Expose
for backwards compatibility.winston-transport@4.0.0 which may cause incompatibilities if
your custom transport does not explicitly require winston-transport
itself.UPGRADE-3.0.md. Add Github Issue Template.logform, triple-beam, and winston-transport to latest.Special thanks to our newest
winstoncore team member – @ChrisAlderson for helping makewinston@3.0.0a reality next week!
Buffer.alloc and Buffer.from instead of new Buffer.winston@3.0.0UPGRADE-3.0.md3.0.0.md into CONTRIBUTING.md and other
improvements to CONTRIBUTING.mdhumanReadableUnhandledException is now the default message format.README.md is correct.devDependencies
assume to ^2.0.1.winston-compat to ^0.1.1.{ silent } option torequire('winston').Logger; require('winston-transport').TransportStream;
isstream with is-stream to make stream detection work in browser.logform@1.4.1CONTRIBUTING.mdv3.0.0-rc3{ level } can be deleted from info objects because Symbol.for('level') is what winston uses internally. Fixes #1184.new stream.Stream()self.filename was not being updated on ENOENTundefined, null and Error valuesmeta objects BECOME the info objectasync to latest (2.6.0)fs.close._onDrain and _onError #1104See UPGRADE-3.0.md for a complete & living upgrade guide.
See 3.0.0.md for a list of remaining RC tasks.
Logger & Transport are now implemented using Node.js objectMode streams.YourTransport is a legacy winston transport. Consider upgrading to winston@3:
- Upgrade docs: https://github.com/winstonjs/winston/tree/master/UPGRADE.md
filters, rewriters, and common.log are now formats: winston.format offers a simple mechanism for user-land formatting & style features. The organic & frankly messy growth of common.log is of the past; these feature requests can be implemented entirely outside of winston itself.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()] });
winston.formatwinston.Transport2.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!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.2.3.1.
.lazyDrain of File transport.fs.unlink.label option to File transport docs.winston.startTimer() method.README.md.CHANGELOG.md entry forthcoming. See the git diff for 2.3.0 for now.CHANGELOG.md entry forthcoming. See the git diff for 2.2.0 for now.fiznool).jbenoit2011)Most important
winston.transports.DailyRotateFile into a separate module: require('winston-daily-rotate-file');npm and cli configs to conform to RFC524. Fixes #424 #406 #290filter function to be consistent with rewriter and log functions:function filter (level, msg, meta, inst) { // Filter logic goes here... }
Other breaking changes
winston.transports.Webhook. Use winston.transports.Http instead.Logger.prototype.addRewriter and Logger.prototype.addFilter since they just push to an Array of functions. Use logger.filters.push or logger.rewriters.push explicitly instead.handleExceptions option to new winston.Logger. Instead just pass in the exceptionHandlers option itself.Logger.prototype.extend functionalityLogger.prototype.configure which now contains all logic previously in the winston.Logger constructor function. (indexzero)coreybutler)eol option to the Console transport. (aquavitae)lib/transports.js for better static analysis. (indexzero)File transport to be an objectMode writable stream. (stambata)indexzero)indexzero)jcrugzz)harriha).wesleyeff)paulhroth)christophehurpeau )paulhroth, kikobeats)timdp)The Gitter Badger)logException. Fixes #218 #213 #327. (indexzero)tailFile function working on latest/all node versions (Christopher Jeffrey)Roman Stetsyshin)indexzero)Roderick Hsiao)Stefan Thies, charukiewicz, unLucio, Adam Cohen, Denis Gorbachev, Frederik Ring, Luigi Pinca, jeffreypriebe)indexzero)marcus)package.json updates cec892c, 2f13b4f, b246efd, 22a5f5a, 5868b78, 99b6b44, 447a813, 7f75b48 (peteward44, Gilad Peleg, Anton Ian Sipos, nimrod-becker, LarsTi, indexzero)String prototypes as a side effect of using colors. (kenperkins)error on error of the underlying streams after maxRetries attempts. (ambbell).os.EOL for all file writing by default. (Mik13, indexzero)Container when close event is emitted. (snater)duration to durationMs, which is now a number a not a string ending in ms. (neoziro)level is falsey on any Transport instance, any Logger instance uses the configured level (instead of the Transport level) (jstamerj).maxFiles in File transport (Fixes #556).showLevel support to File transport.showLevel support to Console transport.oojacoboo).node >= 0.8.0. (indexzero)samz)neouser99)Melnyk Andii)Tony Germaneri)Alberto Pose)Alberto Pose)Chris Oloff)Michiel De Mey)Leonard Martin)indexzero)Loïc Mahieu)John Frizelle)indexzero)until before a default from. Fixes #478. (indexzero)Chasen Le Hara)José F. Romaniello)José F. Romaniello)Ricardo Torres)Alberto Pose)res.resume() in HttpTransport to get around known issues in streams2. (indexzero)Jacob Thomason)Ramon Snir)Michael Neil)Matt Zukowski)orcaman)jupiter)isstream for file transport (jcrugzz)jcrugzz)indexzero)indexzero)indexzero)unlucio)indexzero)indexzero)http transport (indexzero)francoisTemasys)adriano-di-giovanni, indexzero)gdw2, indexzero)danilo1105, indexzero)revington)arxony)gmajoulet)query methods from Transports. Fixes #356. (indexzero)calvinfo)machadogj)pose)## 0.6.2 / 2012-07-08
stringify option