1.0.11 • Published 4 years ago
centivo-logger v1.0.11
Requirements:
The following properties are required in env variable
- APP_NAME=SAMPLE-APP
- NODE_ENV= prod | dev (logging level for prod is INFO and DEBUG for dev)
- LOG_FORMAT = simple | json | prettyPrint (OPTIONAL) (Default json)
Instruction:
Sample code
const { getLogger } = require("centivo-logger");
//create a logger
const logger = getLogger();
//use logger
logger.debug("test");
logger.info("test");
/*this will print
{"message":"test","level":"info","app":"SAMPLE-APP","env":"dev","timestamp":"2020-06-09T17:58:15.022Z"}
*/