Socket
Socket
Sign inDemoInstall

winston

Package Overview
Dependencies
25
Maintainers
6
Versions
82
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 3.0.0-rc3 to 3.0.0-rc4

28

CHANGELOG.md
# CHANGELOG
### v3.0.0-rc4 / 2018-04-06
### IF A TREE FALLS IN THE FORREST DOES IT MAKE A LOG VERSION
- (@indexzero, @dabh) Add support for `{ silent }` option to
``` js
require('winston').Logger;
require('winston-transport').TransportStream;
```
- Better browser support
- [#1145], (@Jasu) Replace `isstream` with `is-stream` to make stream detection work in browser.
- [#1146], (@Jasu) Rename query to different than function name, to support Babel 6.26.
- Better Typescript support in all supporting libraries
- `logform@1.4.1`
- Update documentation
- (@indexzero) Correct link to upgrade guide. Fixes #1255.
- [#1258], (@morenoh149) Document how to colorize levels. Fixes #1135.
- [#1246], (@KlemenPlazar) Update colors argument when adding custom colors
- Update `CONTRIBUTING.md`
- [#1239], (@dabh) Add changelog entries for `v3.0.0-rc3`
- Add example showing that `{ level }` can be deleted from info objects because `Symbol.for('level')` is what `winston` uses internally. Fixes #1184.
## v3.0.0-rc3 / 2018-03-16
### I GOT NOTHING EDITION
- CHANGELOG entry forthcoming.
- [#1195], (@Nilegfx) Fix type error when creating `new stream.Stream()`
- [#1109], (@vsetka) Fix file transprot bug where `self.filename` was not being updated on `ENOENT`
- [#1153], (@wizardnet972) Make prototype methods return like the original method
- [#1234], (@guiguan, @indexzero) Add tests for properly handling logging of `undefined`, `null` and `Error` values
- [#1235], (@indexzero) Add example demonstrating how `meta` objects BECOME the `info` object
- Minor fixes to docs & examples: [#1232], [#1185]

@@ -8,0 +34,0 @@ ## v3.0.0-rc2 / 2018-03-09

15

lib/winston/logger.js

@@ -7,3 +7,3 @@ 'use strict';

const { LEVEL } = require('triple-beam');
const isStream = require('isstream');
const isStream = require('is-stream');
const ExceptionHandler = require('./exception-handler');

@@ -47,2 +47,3 @@ const LegacyTransportStream = require('winston-transport/legacy');

options = options || {};
this.silent = options.silent;
this.format = options.format || this.format || require('logform/json')();

@@ -92,3 +93,3 @@

'Use a custom winston.format(function) instead.',
'See: https://github.com/winstonjs/winston/tree/master/UPGRADING.md'
'See: https://github.com/winstonjs/winston/tree/master/UPGRADE-3.0.md'
].join('\n'));

@@ -193,2 +194,6 @@ }

Logger.prototype._transform = function _transform(info, enc, callback) {
if (this.silent) {
return callback();
}
//

@@ -366,3 +371,3 @@ // [LEVEL] is only soft guaranteed to be set here since we are a proper

const results = {};
const query = common.clone(options.query) || {};
const queryObject = common.clone(options.query) || {};

@@ -374,3 +379,3 @@ //

if (options.query) {
options.query = transport.formatQuery(query);
options.query = transport.formatQuery(queryObject);
}

@@ -552,3 +557,3 @@

'Use a custom winston.formats.cli() instead.',
'See: https://github.com/winstonjs/winston/tree/master/UPGRADING.md'
'See: https://github.com/winstonjs/winston/tree/master/UPGRADE-3.0.md'
].join('\n'));

@@ -555,0 +560,0 @@ };

@@ -10,3 +10,3 @@ /*

const util = require('util');
const isStream = require('isstream');
const isStream = require('is-stream');
const { MESSAGE } = require('triple-beam');

@@ -13,0 +13,0 @@ const TransportStream = require('winston-transport');

{
"name": "winston",
"description": "A multi-transport async logging library for Node.js",
"version": "3.0.0-rc3",
"version": "3.0.0-rc4",
"author": "Charlie Robbins <charlie.robbins@gmail.com>",

@@ -23,8 +23,8 @@ "maintainers": [

"diagnostics": "^1.0.1",
"isstream": "0.1.x",
"logform": "^1.2.1",
"is-stream": "^1.1.0",
"logform": "^1.4.1",
"one-time": "0.0.4",
"stack-trace": "0.0.x",
"triple-beam": "^1.0.1",
"winston-transport": "^3.0.1"
"winston-transport": "^3.1.0"
},

@@ -31,0 +31,0 @@ "devDependencies": {

@@ -11,6 +11,6 @@ # winston

## winston@3.0.0-rc3
## winston@3.0.0-rc4
We are looking for feedback on the latest version of `winston`:
`winston@3.0.0-rc3`.
`winston@3.0.0-rc4`.

@@ -145,2 +145,3 @@ ```

| `exitOnError` | `true` | If false, handled exceptions will not cause `process.exit` |
| `silent` | `false` | If true, all logs are suppressed |

@@ -574,3 +575,3 @@ The levels provided to `createLogger` will be defined as convenience methods

``` js
winston.addColors(myCustomLevels);
winston.addColors(myCustomLevels.colors);
```

@@ -598,3 +599,14 @@

`magentaBG`, `cyanBG`, `whiteBG`
### Colorizing Standard logging levels
To colorize the standard logging level add
```js
winston.format.combine(
winston.format.colorize(),
winston.format.json()
)
```
where `winston.format.json()` is whatever other formatter you want to use.
## Transports

@@ -601,0 +613,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc