'make check' clean
This commit is contained in:
parent
a3e7081be6
commit
7ef6b120db
2 changed files with 13 additions and 10 deletions
|
@ -349,7 +349,7 @@ function Logger(options, _childOptions, _childSimple) {
|
||||||
level: (options.level ? resolveLevel(options.level) : INFO)
|
level: (options.level ? resolveLevel(options.level) : INFO)
|
||||||
});
|
});
|
||||||
} else if (options.streams) {
|
} else if (options.streams) {
|
||||||
options.streams.forEach(function(s) {
|
options.streams.forEach(function (s) {
|
||||||
s.level = s.level || s.level;
|
s.level = s.level || s.level;
|
||||||
self.addStream(s);
|
self.addStream(s);
|
||||||
});
|
});
|
||||||
|
@ -414,7 +414,7 @@ util.inherits(Logger, EventEmitter);
|
||||||
* 'file' stream when `path` is given, false otherwise.
|
* 'file' stream when `path` is given, false otherwise.
|
||||||
* See README.md for full details.
|
* See README.md for full details.
|
||||||
*/
|
*/
|
||||||
Logger.prototype.addStream = function(s) {
|
Logger.prototype.addStream = function addStream(s) {
|
||||||
var self = this;
|
var self = this;
|
||||||
|
|
||||||
s = objCopy(s);
|
s = objCopy(s);
|
||||||
|
@ -488,10 +488,10 @@ Logger.prototype.addStream = function(s) {
|
||||||
/**
|
/**
|
||||||
* Add serializers
|
* Add serializers
|
||||||
*
|
*
|
||||||
* @param serializers {Object} Optional. Object mapping log record field names to
|
* @param serializers {Object} Optional. Object mapping log record field names
|
||||||
* serializing functions. See README.md for details.
|
* to serializing functions. See README.md for details.
|
||||||
*/
|
*/
|
||||||
Logger.prototype.addSerializers = function(serializers) {
|
Logger.prototype.addSerializers = function addSerializers(serializers) {
|
||||||
var self = this;
|
var self = this;
|
||||||
|
|
||||||
if (!self.serializers) {
|
if (!self.serializers) {
|
||||||
|
|
|
@ -31,6 +31,7 @@ test('ensure Logger creation options', function (t) {
|
||||||
|
|
||||||
var options = {name: 'foo', stream: process.stdout, streams: []};
|
var options = {name: 'foo', stream: process.stdout, streams: []};
|
||||||
t.throws(function () { new Logger(options); },
|
t.throws(function () { new Logger(options); },
|
||||||
|
/* JSSTYLED */
|
||||||
/cannot mix "streams" and "stream" options/,
|
/cannot mix "streams" and "stream" options/,
|
||||||
'cannot use "stream" and "streams"');
|
'cannot use "stream" and "streams"');
|
||||||
|
|
||||||
|
@ -76,6 +77,7 @@ test('ensure Logger creation options (createLogger)', function (t) {
|
||||||
|
|
||||||
var options = {name: 'foo', stream: process.stdout, streams: []};
|
var options = {name: 'foo', stream: process.stdout, streams: []};
|
||||||
t.throws(function () { bunyan.createLogger(options); },
|
t.throws(function () { bunyan.createLogger(options); },
|
||||||
|
/* JSSTYLED */
|
||||||
/cannot mix "streams" and "stream" options/,
|
/cannot mix "streams" and "stream" options/,
|
||||||
'cannot use "stream" and "streams"');
|
'cannot use "stream" and "streams"');
|
||||||
|
|
||||||
|
@ -114,6 +116,7 @@ test('ensure Logger child() options', function (t) {
|
||||||
|
|
||||||
var options = {stream: process.stdout, streams: []};
|
var options = {stream: process.stdout, streams: []};
|
||||||
t.throws(function () { log.child(options); },
|
t.throws(function () { log.child(options); },
|
||||||
|
/* JSSTYLED */
|
||||||
/cannot mix "streams" and "stream" options/,
|
/cannot mix "streams" and "stream" options/,
|
||||||
'cannot use "stream" and "streams"');
|
'cannot use "stream" and "streams"');
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue