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