mirror of
https://git.hibas.dev/OpenServer/NodeLogging.git
synced 2025-07-01 12:41:11 +00:00
Adding automatic logfile creation depending on name
This commit is contained in:
@ -41,6 +41,14 @@ class LoggingBase {
|
||||
this.events = new events_1.EventEmitter();
|
||||
if (!options)
|
||||
options = {};
|
||||
if (options.name) {
|
||||
if (options.logfile === undefined) {
|
||||
options.logfile = `./logs/all.${options.name}.log`;
|
||||
}
|
||||
if (options.errorfile === undefined) {
|
||||
options.logfile = `./logs/error.${options.name}.log`;
|
||||
}
|
||||
}
|
||||
this.config = Object.assign({
|
||||
name: undefined,
|
||||
console_out: true,
|
||||
|
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user