Skip to content

Not working #30

@jbmyid

Description

@jbmyid

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

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions