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.0
File
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
winston
core team member – @ChrisAlderson for helping makewinston@3.0.0
a reality next week!
Buffer.alloc
and Buffer.from
instead of new Buffer
.winston@3.0.0
UPGRADE-3.0.md
3.0.0.md
into CONTRIBUTING.md
and other
improvements to CONTRIBUTING.md
humanReadableUnhandledException
is now the default message format.README.md
is correct.devDependencies
assume
to ^2.0.1
.winston-compat
to ^0.1.1
.(@indexzero, @dabh) Add support for { silent }
option to
require('winston').Logger;
require('winston-transport').TransportStream;
isstream
with is-stream
to make stream detection work in browser.logform@1.4.1
CONTRIBUTING.md
v3.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 ENOENT
undefined
, 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.
``` 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:
winston.format
winston.Transport
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.
2.3.1
.
57af38a
] Missing context in .lazyDrain
of File
transport.178935f
] Suppress excessive Node warning from fs.unlink
.fcf04e1
] Add label
option to File
transport docs.7e736b4
], [24300e2
] Added more info about undocumented winston.startTimer()
method.e1e7188
] Minor grammatical & style updates to 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:
js
function filter (level, msg, meta, inst) {
// Filter logic goes here...
}
Other breaking changes
- e0c9dde Remove winston.transports.Webhook
. Use winston.transports.Http
instead.
- f71e638 Remove 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.
- a470ab5 No longer respect the handleExceptions
option to new winston.Logger
. Instead just pass in the exceptionHandlers
option itself.
- 8cb7048 Removed Logger.prototype.extend
functionality
#### New features
- 3aa990c Added Logger.prototype.configure
which now contains all logic previously in the winston.Logger
constructor function. (indexzero
)
- #726 Update .npmignore (coreybutler
)
- #700 Add an eol
option to the Console
transport. (aquavitae
)
- #731 Update lib/transports.js
for better static analysis. (indexzero
)
#### Fixes, refactoring, and optimizations. OH MY!
- #632 Allow File
transport to be an objectMode
writable stream. (stambata
)
- #527, 163f4f9, 3747ccf Performance optimizations and string interpolation edge cases (indexzero
)
- f0edafd Code cleanup for reability, ad-hoc styleguide enforcement (indexzero
)
## v1.1.1 - v1.1.2 / 2015-10
### MINOR FIXES EDITION
#### Notable changes
* 727 Fix "raw" mode (jcrugzz
)
* 703 Do not modify Error or Date objects when logging. Fixes #610 (harriha
).
## v1.1.0 / 2015-10-09
### GREETINGS FROM CARTAGENA EDITION
#### Notable Changes
* #721 Fixed octal literal to work with node 4 strict mode (wesleyeff
)
* #630 Add stderrLevels option to Console Transport and update docs (paulhroth
)
* #626 Add the logger (this) in the fourth argument in the rewriters and filters functions (christophehurpeau
)
* #623 Fix Console Transport's align option tests (paulhroth
, kikobeats
)
* #692 Adding winston-aws-cloudwatch to transport docs (timdp
)
## v1.0.2 2015-09-25
### LET'S TALK ON GITTER EDITION
#### Notable Changes
* de80160 Add Gitter badge (The Gitter Badger
)
* 44564de [fix] Correct listeners in logException
. Fixes #218 #213 #327. (indexzero
)
* 45b1eeb [fix] Get tailFile
function working on latest/all node versions (Christopher Jeffrey
)
* c6d45f9 Fixed event subscription on close (Roman Stetsyshin
)
#### Other changes
* TravisCI updates & best practices 87b97cc 91a5bc4, cf24e6a (indexzero
)
* d5397e7 Bump async version (Roderick Hsiao
)
* Documentation updates & fixes 86d7527, 38254c1, 04e2928, 61c8a89, c42a783, 0688a22, eabc113 c9506b7, 17534d2, b575e7b (Stefan Thies
, charukiewicz
, unLucio
, Adam Cohen
, Denis Gorbachev
, Frederik Ring
, Luigi Pinca
, jeffreypriebe
)
* Documentation refactor & cleanup a19607e, d1932b4, 7a13132 (indexzero
)
## v1.0.1 / 2015-06-26
### YAY DOCS EDITION
* #639 Fix for #213: More than 10 containers triggers EventEmitter memory leak warning (marcus
)
* Documentation and package.json
updates cec892c, 2f13b4f, b246efd, 22a5f5a, 5868b78, 99b6b44, 447a813, 7f75b48 (peteward44
, Gilad Peleg
, Anton Ian Sipos
, nimrod-becker
, LarsTi
, indexzero
)
## v1.0.0 / 2015-04-07
### OMG 1.0.0 FINALLY EDITION
#### Breaking Changes
* #587 Do not extend String
prototypes as a side effect of using colors
. (kenperkins
)
* #581 File transports now emit error
on error of the underlying streams after maxRetries
attempts. (ambbell
).
* #583, 92729a Use os.EOL
for all file writing by default. (Mik13
, indexzero
)
* #532 Delete logger instance from Container
when close
event is emitted. (snater
)
* #380 Rename duration
to durationMs
, which is now a number a not a string ending in ms
. (neoziro
)
* #253 Do not set a default level. When level
is falsey on any Transport
instance, any Logger
instance uses the configured level (instead of the Transport level) (jstamerj
).
#### Other changes
* b83de62 Fix rendering of stack traces.
* c899cc Update documentation (Fixes #549)
* #551 Filter metadata along with messages
* #578 Fixes minor issue with maxFiles
in File
transport (Fixes #556).
* #560 Added showLevel
support to File
transport.
* #558 Added showLevel
support to Console
transport.
## v0.9.0 / 2015-02-03
* #496 Updated default option handling for CLI (oojacoboo
).
* f37634b [dist] Only support node >= 0.8.0
. (indexzero
)
* 91a1e90, 50163a0 Fix #84 Enable a better unhandled exception experience (samz
)
* 8b5fbcd #448 Added tailable option to file transport which rolls files backwards instead of creating incrementing appends. Implements #268 (neouser99
)
* a34f7d2 Custom log formatter functionality were added. (Melnyk Andii
)
* 4c08191 Added showLevel flag to common.js, file*, memory and console transports. (Tony Germaneri
)
* 64ed8e0 Adding custom pretty print function test. (Alberto Pose
)
* 3872dfb Adding prettyPrint parameter as function example. (Alberto Pose
)
* 2b96eee implemented filters #526 (Chris Oloff
)
* 72273b1 Added the options to colorize only the level, only the message or all. Default behavior is kept. Using true will only colorize the level and false will not colorize anything. (Michiel De Mey
)
* 178e8a6 Prevent message from meta input being overwritten (Leonard Martin
)
* 270be86 [api] Allow for transports to be removed by their string name [test fix] Add test coverage for multiple transports of the same type added in #187. [doc] Document using multiple transports of the same type (indexzero
)
* 0a848fa Add depth options for meta pretty print (Loïc Mahieu
)
* 106b670 Allow debug messages to be sent to stdout (John Frizelle
)
* ad2d5e1 [fix] Handle Error instances in a sane way since their properties are non-enumerable by default. Fixes #280. (indexzero
)
* 5109dd0 [fix] Have a default until
before a default from
. Fixes #478. (indexzero
)
* d761960 Fix logging regular expression objects (Chasen Le Hara
)
* 2632eb8 Add option for EOL chars on FileTransport (José F. Romaniello
)
* bdecce7 Remove duplicate logstash option (José F. Romaniello
)
* 7a01f9a Update declaration block according to project's style guide (Ricardo Torres
)
* ae27a19 Fixes #306: Can't set customlevels to my loggers (RangeError: Maximum call stack size exceeded) (Alberto Pose
)
* 1ba4f51 [fix] Call res.resume()
in HttpTransport to get around known issues in streams2. (indexzero
)
* 39e0258 Updated default option handling for CLI (Jacob Thomason
)
* 8252801 Added logstash support to console transport (Ramon Snir
)
* 18aa301 Module isStream should be isstream (Michael Neil
)
* 2f5f296 options.prettyPrint can now be a function (Matt Zukowski
)
* a87a876 Adding rotationFormat prop to file.js (orcaman
)
* ff187f4 Allow custom exception level (jupiter
)
## 0.8.3 / 2014-11-04
* fix lowercase issue (jcrugzz
)
## 0.8.2 / 2014-11-04
* Full fix for #296 with proper streams2 detection with isstream
for file transport (jcrugzz
)
* Add isstream module (jcrugzz
)
* Partially fix #296 with streams2 detection for file transport (indexzero
)
* add stress test for issue #288 (indexzero
)
* lessen timeouts to check test sanity (indexzero
)
* update winston-graylog2 documentation (unlucio
)
* fix test formatting (indexzero
)
* fix so options are not redefined (indexzero
)
* fix self/this issue that broke http
transport (indexzero
)
## 0.8.1 / 2014-10-06
* Add label option for DailyRotateFile transport (francoisTemasys
)
* fix Logger#transports length check upon Logger#log (adriano-di-giovanni
, indexzero
)
* err can be a string. (gdw2
, indexzero
)
* Added color for pre-defined cli set. (danilo1105
, indexzero
)
* Fix dates on transport test (revington
)
* Included the label from options to the output in JSON mode. (arxony
)
* Allow using logstash option with the File transport (gmajoulet
)
* Be more defensive when working with query
methods from Transports. Fixes #356. (indexzero)
* Catch exceptions for file transport unlinkSync (calvinfo
)
* Adding the 'addRewriter' to winston (machadogj
)
* Updates to transport documentation (pose
)
* fix typo in "Extending another object with Logging" section.
* Updated README.md - Replaced properties with those listed in winston-mongodb module
## 0.8.0 / 2014-09-15
* Fixes for HTTP Transport
* Removing jsonquest and request dependencies.
* Configuration is now shalow cloned.
* Added logstash support
* Fix for "flush" event should always fire after "flush" call bug
* Added tests for file: open and stress.
* Test fixes
* Fix ")" on string interpolation
## 0.6.2 / 2012-07-08
* Added prettyPrint option for console logging
* Multi-line values for conditional returns are not allowed
* Added acceptance of stringify
option
* Fixed padding for log levels