'make check' clean

This commit is contained in:
Trent Mick 2014-08-25 00:50:53 -07:00
parent a3e7081be6
commit 7ef6b120db
2 changed files with 13 additions and 10 deletions

View file

@ -349,7 +349,7 @@ function Logger(options, _childOptions, _childSimple) {
level: (options.level ? resolveLevel(options.level) : INFO)
});
} else if (options.streams) {
options.streams.forEach(function(s) {
options.streams.forEach(function (s) {
s.level = s.level || s.level;
self.addStream(s);
});
@ -414,7 +414,7 @@ util.inherits(Logger, EventEmitter);
* 'file' stream when `path` is given, false otherwise.
* See README.md for full details.
*/
Logger.prototype.addStream = function(s) {
Logger.prototype.addStream = function addStream(s) {
var self = this;
s = objCopy(s);
@ -488,10 +488,10 @@ Logger.prototype.addStream = function(s) {
/**
* Add serializers
*
* @param serializers {Object} Optional. Object mapping log record field names to
* serializing functions. See README.md for details.
* @param serializers {Object} Optional. Object mapping log record field names
* to serializing functions. See README.md for details.
*/
Logger.prototype.addSerializers = function(serializers) {
Logger.prototype.addSerializers = function addSerializers(serializers) {
var self = this;
if (!self.serializers) {

View file

@ -31,6 +31,7 @@ test('ensure Logger creation options', function (t) {
var options = {name: 'foo', stream: process.stdout, streams: []};
t.throws(function () { new Logger(options); },
/* JSSTYLED */
/cannot mix "streams" and "stream" options/,
'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: []};
t.throws(function () { bunyan.createLogger(options); },
/* JSSTYLED */
/cannot mix "streams" and "stream" options/,
'cannot use "stream" and "streams"');
@ -114,6 +116,7 @@ test('ensure Logger child() options', function (t) {
var options = {stream: process.stdout, streams: []};
t.throws(function () { log.child(options); },
/* JSSTYLED */
/cannot mix "streams" and "stream" options/,
'cannot use "stream" and "streams"');