1.0.6 • Published 2 years ago

sahilrajput03-logger v1.0.6

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

README

Why?

  • Middleware has coloured output as compared to using morgan's log printing for the requests.
  • Simple coloured logs with different levels with matching color schemes i.e., logs related to info, warn and error.
  • Prints the line number of the source log instruction as well.

Usage:

# INSTALL
npm i sahilrajput03-logger

# FOR GENERAL LOGGING
const {loggert, logger} = require('sahilrajput03-logger')
const data = {friend: 'mercedes'}  // can be anything
logger.warn(data)
logger.info(data)
logger.err(data)

# FOR MIDDLEWARE
const {logMw} = require('@sahil/logger')
app.use(logMw)
1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago