mirror of
https://github.com/log4js-node/log4js-node.git
synced 2025-12-08 19:26:01 +00:00
chore: removed unused lines
This commit is contained in:
parent
d80f3f10d5
commit
b51d8b0994
@ -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);
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user