GithubHelp home page GithubHelp logo

logger-npm's Introduction

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)

# FOR SETTING UP MY FAVOURITE COLORS
const {setupColors} = require('sahilrajput03-logger')
setupColors()

console.log('wowo'.mb) // To view list of available colors you can look into `lib/setupColors.js` file.

logger-npm's People

Contributors

sahilrajput03 avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.