-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Description
I have this simple module which is not working, Also there is no error while calling info method
"use strict";
const log4node = require("log4node");
let Logger = {
conversation_uuid: null,
info() {
let _log = this.getLogger();
_log.info.apply(_log, arguments);
},
error() {
let _log = this.getLogger();
_log.error.apply(_log, arguments);
},
getLogger() {
if(this.logger){
return this.logger;
}else{
let dir = process.cwd().split("/");
return new log4node.Log4Node({ level: 'debug', file: `${dir.join("/")}/logs/conv_${this.conversation_uuid}.log`});
}
}
};
module.exports = Logger;
Metadata
Metadata
Assignees
Labels
No labels