Skip to content

anangnovriadi/nangning-logger-js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nangning-logger-js

This is sample logger with winston module.

Installation

npm install nangning-logger-js

Usage

const logger = require("nangning-logger-js");

// Sample loggerRequest
logger.loggerRequest.info({ 
    method: req.method,
    endpoint: req.originalUrl,
    label: 'API Example',
    message: req.body
})

// Sample loggerResponse
logger.loggerResponse.info({ 
    method: req.method,
    endpoint: req.originalUrl,
    label: 'API Example',
    message: req.body
})

For the full reference check the Winston GitHub repository.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published