Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix logging when level is set on the logger, but no level is set on tranports #253

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion lib/winston/transports/transport.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@ var Transport = exports.Transport = function (options) {
events.EventEmitter.call(this);

options = options || {};
this.level = options.level || 'info';
// Do not set a default level
// When this.level is falsey, logger.js uses a logger configured level
// (instead of the transport level)
this.level = options.level;
this.silent = options.silent || false;
this.raw = options.raw || false;
this.name = options.name || this.name;
Expand Down