chore: removed unused lines

This commit is contained in:
Gareth Jones 2019-05-23 08:15:13 +10:00
parent d80f3f10d5
commit b51d8b0994

View File

@ -25,7 +25,6 @@ function parseCallStack(data, skipIdx = 4) {
return null;
}
// const _useCallStack = Symbol('useCallStack');
/**
* Logger to log messages.
* use {@see log4js#getLogger(String)} to get an instance.
@ -46,8 +45,6 @@ class Logger {
this.category = name;
this.context = {};
debug(`Logger created (${this.category}, ${this.level})`);
// this[_useCallStack] = false;
}
get level() {
@ -59,12 +56,10 @@ class Logger {
}
get useCallStack() {
// return this[_useCallStack];
return categories.getEnableCallStackForCategory(this.category);
}
set useCallStack(bool) {
// this[_useCallStack] = (bool === true);
categories.setEnableCallStackForCategory(this.category, (bool === true));
}
@ -81,8 +76,13 @@ class Logger {
_log(level, data) {
debug(`sending log data (${level}) to appenders`);
// eslint-disable-next-line max-len
const loggingEvent = new LoggingEvent(this.category, level, data, this.context, (this.useCallStack) && parseCallStack(new Error()));
const loggingEvent = new LoggingEvent(
this.category,
level,
data,
this.context,
(this.useCallStack) && parseCallStack(new Error())
);
clustering.send(loggingEvent);
}