开发者社区> 镜像站> NPM> boilerplate-logger
boilerplate-logger
here will be the logger that all the micro services will use to output their logs to winston and logzio
Last updated 9 months ago by ronssg .
ISC · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install boilerplate-logger 
SYNC missed versions from official npm registry.

boilerplate-logger

here will be the logger that all the micro services will use to output their logs to winston and logzio. There are 2 ways to use the logger after installing the npm package:

  1. logger.debug({ message: 'Hey! Log something?',division: "Notification MicroService"}); explanation: logger.debug => debug is the level of the log, all the levels written at the end. message => added info to the bug (example: Error occurred in the HTTP request). division => where the bug happened(example: Notification MicroService).

  2. logger.error(new Error("message")) / try{}catch{err => logger.error(err)}, This format record stack trace.
    explanation: logger.error => error is the level of the log, all the levels written at the end. message => added info to the bug (example: Error occurred in the HTTP request).

log levels from high to low: error: 0, warn: 1, info: 2, http: 3, verbose: 4, debug: 5, silly: 6

Current Tags

  • 0.0.2                                ...           latest (9 months ago)

1 Versions

  • 0.0.2                                ...           9 months ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (4)
Dev Dependencies (0)
None
Dependents (0)
None