1.0.2 • Published 5 years ago

edisga-customlogger v1.0.2

Weekly downloads
-
License
ISC
Repository
-
Last release
5 years ago

This was created for internal project

How to import

var logger =  require('edisga-customlogger');

How to use it

This will send the output to console.log following the next syntax:

    { 
      category: category, 
      code: code,
      date: moment().format(), 
      custom: custom,
      method:method 
    }
logger.stdout("app", 1, "Listening on " + config.port ,"app.listen")

And the following for error:

    { 
      category: category, 
      code: code,
      date: moment().format(), 
      error: { 
            name: err.name, 
            message: err.message 
        }, 
      custom: custom,
      method:method 
    }
logger.stderr("db", 500 , err, "Db client was not able to connect.", "dbconnect")
1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago