more linting

This commit is contained in:
Gareth Jones 2013-05-30 08:26:26 +10:00
parent 516320c79a
commit 46ae1a586d

View File

@ -1,7 +1,8 @@
var levels = require('./levels'), "use strict";
util = require('util'), var levels = require('./levels')
events = require('events'), , util = require('util')
DEFAULT_CATEGORY = '[default]'; , events = require('events')
, DEFAULT_CATEGORY = '[default]';
/** /**
* Models a logging event. * Models a logging event.
@ -30,12 +31,13 @@ function LoggingEvent (categoryName, level, data, logger) {
function Logger (name, level) { function Logger (name, level) {
this.category = name || DEFAULT_CATEGORY; this.category = name || DEFAULT_CATEGORY;
if (! this.level) { if (level) {
this.__proto__.level = levels.TRACE; this.setLevel(level);
} }
} }
util.inherits(Logger, events.EventEmitter); util.inherits(Logger, events.EventEmitter);
Logger.DEFAULT_CATEGORY = DEFAULT_CATEGORY; Logger.DEFAULT_CATEGORY = DEFAULT_CATEGORY;
Logger.prototype.level = levels.TRACE;
Logger.prototype.setLevel = function(level) { Logger.prototype.setLevel = function(level) {
this.level = levels.toLevel(level, this.level || levels.TRACE); this.level = levels.toLevel(level, this.level || levels.TRACE);