Skip to content

BNetTargetDummy/logger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TargetDummy Logger

Install

$ npm i BNetTargetDummy/logger

Require

const logToConsole = require('@targetdummy/logger')('console');
const logToFile = require('@targetdummy/logger')('file');

Usage

const objectToBeLogged = { data: 'test' };

logToConsole.info(objectToBeLogged); // only outputs to console.
logToFile.info(objectToBeLogged); // outputs to console and persists to `targetdummy.log`

Result

{"request_id":"a7d37d00-e066-11e6-afcb-452332f8cf95","level":"info","message":"{\"data\":\"test\"}","timestamp":"2017-01-22T05:50:18.834Z"}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published