X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/a4e92f85f83046cef29d4ce0f71cea6250ce8df6..82a99e22c8cfc4e50bc15307c818878a261ca1bb:/src/fnpjs/logging/logging.js diff --git a/src/fnpjs/logging/logging.js b/src/fnpjs/logging/logging.js index e68302d..4237f65 100644 --- a/src/fnpjs/logging/logging.js +++ b/src/fnpjs/logging/logging.js @@ -37,9 +37,14 @@ _.extend(Logger.prototype, { } if(levels.indexOf(handlerLevel) !== -1 && levels.indexOf(level) >= levels.indexOf(handlerLevel)) { - handler(message, level, data); + handler({ + message: message, + level: level, + loggerName: this.name, + data: data + }); } - }); + }.bind(this)); } if(this.config.propagate && this.name) { var logger = new Logger(this.name.split('.').slice(0, -1).join('.'));