ghost-logger
v2.2.0
Published
A ghost logger wrapper
Downloads
21
Readme
Ghost Logger
Installation
npm i ghost-logger --save
Overview
This module is a generic logger for winston console, logentries, loggly, and new relic. Provides a simple console.LEVEL
like interface to log in your app with.
Configuration information can be found below.
Logger
const GhostLogger = require('ghost-logger');
const logger = new GhostLogger(config);
logger.info("it's lit", { data: myData });
Config
blacklist
[ARRAY] Blacklisted Attributes to remove from logsconsole
:loggly
:logentries
:enabled
[BOOLEAN] will only log if set to truetoken
[STRING] your logentries api tokenconsole
[BOOLEAN] if set to true, will also log to the console
newrelic
:
Example config file
{
"enabled": true,
"logentries": {
"enabled": true,
"token": "-- YOUR LOGENTRIES TOKEN --",
"console": true
},
"blacklist": ["password","credit_card"]
}