Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

winston

Package Overview
Dependencies
Maintainers
6
Versions
89
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

winston - npm Package Compare versions

Comparing version 3.0.0-rc1 to 3.0.0-rc2

12

CHANGELOG.md

@@ -0,3 +1,15 @@

# CHANGELOG
## v3.0.0-rc2 / 2018-03-09
### MAINTENANCE RESUMES EDITION
- [#1209], (@dabh) Use new version of colors, solving a number of issues.
- [#1197], (@indexzero) Roadmap & guidelines for contributors.
- [#1100] Require the package.json by its full name.
- [#1149] Updates `async` to latest (`2.6.0`)
- [#1228], (@mcollina) Always pass a function to `fs.close`.
- Minor fixes to docs & examples: [#1177], [#1182], [#1208], [#1198], [#1165], [#1110], [#1117], [#1097], [#1155], [#1084], [#1141], [#1210], [#1223].
## v3.0.0-rc1 / 2017-10-19
### OMG THEY FORGOT TO NAME IT EDITION

@@ -4,0 +16,0 @@ - Fix file transport improper binding of `_onDrain` and `_onError` [#1104](https://github.com/winstonjs/winston/pull/1104)

2

lib/winston.js

@@ -18,3 +18,3 @@ /*

//
winston.version = require('../package').version;
winston.version = require('../package.json').version;

@@ -21,0 +21,0 @@ //

@@ -66,3 +66,3 @@ /*

if (stream.destroyed) {
fs.close(fd);
fs.close(fd, nop);
return;

@@ -185,1 +185,3 @@ }

};
function nop() {}

@@ -12,3 +12,3 @@ /*

const os = require('os');
const async = require('async');
const asyncForEach = require('async/forEach');
const debug = require('diagnostics')('winston:exception');

@@ -210,3 +210,3 @@ const once = require('one-time');

//
async.forEach(handlers, function awaitLog(handler, next) {
asyncForEach(handlers, function awaitLog(handler, next) {
//

@@ -213,0 +213,0 @@ // TODO: Change these to the correct WritableStream events

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

const util = require('util');
const async = require('async');
const asyncForEach = require('async/forEach');
const { LEVEL } = require('triple-beam');

@@ -404,3 +404,3 @@ const isStream = require('isstream');

//
async.forEach(this.transports.filter(function (transport) {
asyncForEach(this.transports.filter(function (transport) {
return !!transport.query;

@@ -407,0 +407,0 @@ }), addResults, function () {

@@ -12,3 +12,3 @@ /*

const util = require('util');
const async = require('async');
const asyncSeries = require('async/series');
const zlib = require('zlib');

@@ -551,3 +551,3 @@ const { MESSAGE } = require('triple-beam');

async.series(tasks, function (err) { // eslint-disable-line
asyncSeries(tasks, function (err) { // eslint-disable-line
fs.rename(

@@ -554,0 +554,0 @@ path.join(self.dirname, basename + ext),

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

@@ -21,3 +21,3 @@ "maintainers": [

"dependencies": {
"async": "^1.0.0",
"async": "^2.6.0",
"diagnostics": "^1.0.1",

@@ -34,3 +34,3 @@ "isstream": "0.1.x",

"assume": "^1.5.1",
"colors": "~1.1.2",
"colors": ">= 1.2.0-rc0",
"cross-spawn-async": "^2.0.0",

@@ -37,0 +37,0 @@ "eslint-config-populist": "^4.1.0",

@@ -5,3 +5,3 @@ # winston

[![Version npm](https://img.shields.io/npm/v/winston.svg?style=flat-square)](https://www.npmjs.com/package/winston)[![npm Downloads](https://img.shields.io/npm/dm/winston.svg?style=flat-square)](https://www.npmjs.com/package/winston)[![Build Status](https://img.shields.io/travis/winstonjs/winston/master.svg?style=flat-square)](https://travis-ci.org/winstonjs/winston)[![Dependencies](https://img.shields.io/david/winstonjs/winston.svg?style=flat-square)](https://david-dm.org/winstonjs/winston)
[![Version npm](https://img.shields.io/npm/v/winston.svg?style=flat-square)](https://www.npmjs.com/package/winston)[![npm Downloads](https://img.shields.io/npm/dm/winston.svg?style=flat-square)](https://npmcharts.com/compare/winston?minimal=true)[![Build Status](https://img.shields.io/travis/winstonjs/winston/master.svg?style=flat-square)](https://travis-ci.org/winstonjs/winston)[![Dependencies](https://img.shields.io/david/winstonjs/winston.svg?style=flat-square)](https://david-dm.org/winstonjs/winston)

@@ -24,2 +24,6 @@ [![NPM](https://nodei.co/npm/winston.png?downloads=true&downloadRank=true)](https://nodei.co/npm/winston/)

## 3.0.0 Documentation
Please note that the documentation below is for 3.0.0. [See here for the 2.4.0 documentation.](https://github.com/winstonjs/winston/tree/2.4.0).
## Motivation

@@ -79,3 +83,3 @@

* [Creating your logger](#creating-your-own-logger)
* [Streams, `objectMode`, and info` objects](#streams-objectmode-and-info-objects)
* [Streams, `objectMode`, and `info` objects](#streams-objectmode-and-info-objects)
* [Formats]

@@ -134,3 +138,3 @@ * [Combining formats](#combining-formats)

A logger accepts a following parameters:
A logger accepts the following parameters:

@@ -153,3 +157,3 @@ | Name | Default | Description |

logger.log({
level: 'info'
level: 'info',
message: 'Hello distributed log files!'

@@ -200,3 +204,3 @@ });

### Streams, `objectMode`, and info` objects
### Streams, `objectMode`, and `info` objects

@@ -232,7 +236,9 @@ In `winston`, both `Logger` and `Transport` instances are treated as

Formats in `winston` can be accessed from `winston.format`. They are
implemented in, `logform`, a separate module from `winston`. This allows
flexibility when writing your own transports in case you wish to include a
default format with your transport.
implemented in [`logform`](https://github.com/winstonjs/logform), a separate
module from `winston`. This allows flexibility when writing your own transports
in case you wish to include a default format with your transport.
In modern versions of `node` template strings are very performant and are the recommended way for doing most end-user formatting. If you want to bespoke format your logs, `winston.format.printf` is for you:
In modern versions of `node` template strings are very performant and are the
recommended way for doing most end-user formatting. If you want to bespoke
format your logs, `winston.format.printf` is for you:

@@ -257,2 +263,6 @@ ``` js

To see what built-in formats are available and learn more about creating your
own custom logging formats, see
[`logform`](https://github.com/winstonjs/logform).
### Combining formats

@@ -419,3 +429,3 @@

message: `WHY ARE THEY MAKING US YELL SO MUCH!`
}), whisper.options);
}, whisper.options));
// {

@@ -517,3 +527,3 @@ // level: 'info'

const transports = {
console: new winston.transports.Console({ level: 'warn': level: 'warn' }),
console: new winston.transports.Console({ level: 'warn' }),
file: new winston.transports.File({ filename: 'combined.log', level: 'error' })

@@ -662,3 +672,3 @@ };

// Enable exception handling when you create your logger.
const logger = winston.createLogger({
const logger = createLogger({
transports: [

@@ -673,3 +683,3 @@ new transports.File({ filename: 'combined.log' })

// Or enable it later on by adding a transport or using `.exceptions.handle`
const logger = winston.createLogger({
const logger = createLogger({
transports: [

@@ -898,3 +908,3 @@ new transports.File({ filename: 'combined.log' })

const logger = winston.createLogger({
transports: [transport];
transports: [transport]
});

@@ -1003,3 +1013,3 @@

All of the winston tests are written with `mocha`, `nyc`, and `assume`. They
All of the winston tests are written with [`mocha`][mocha], [`nyc`][nyc], and [`assume`][assume]. They
can be run with `npm`.

@@ -1025,2 +1035,5 @@

[util.format]: https://nodejs.org/dist/latest/docs/api/util.html#util_util_format_format_args
[mocha]: https://mochajs.org
[nyc]: https://github.com/istanbuljs/nyc
[assume]: https://github.com/bigpipe/assume

@@ -1027,0 +1040,0 @@ [Charlie Robbins]: http://github.com/indexzero

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc