sahilrajput03-logger

1.0.6 • Public • Published

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)

Readme

Keywords

none

Package Sidebar

Install

npm i sahilrajput03-logger

Weekly Downloads

0

Version

1.0.6

License

ISC

Unpacked Size

6.34 kB

Total Files

6

Last publish

Collaborators

  • sahilrajput03