chuchote
v1.0.1
Published
Configurable JavaScript logger.
Downloads
6
Readme
Configurable JavaScript logger.
Installation
$ yarn add chuchote
Getting Started
chuchote
expose a createLogger
function which allows you to create a personalized logger.
const chuchote = require("chuchote");
const log = chuchote.createLogger({
filterLevel:
process.env.NODE_ENV === "production"
? chuchote.logLevel.OFF
: chuchote.logLevel.INFO,
handler: (messages, { level }) => {
console.log(`${level.name}: ${messages[0]}`);
}
});
log.error("You made a mistake");