logget
A simple wrapper around winston
that
helps give context to your logs.
Deprecated. Opt to use winston or bunyan directly.
Installation
npm install --save logget
Usage
Simple usage:
The object that gets returned can be used like a winston logger instance.
var log = ; log;log;log;log;log;log;
Advanced usage:
If you pass in a string to the function, it will prefix your messages with that string wrapped around square brackets.
// app.jsvar log = 'app';log; // Will log out "info: [app] testing" // model.jsvar log = 'model';log; // Will log out "info: [model] testing"
Expert usage:
You can customize what transports, log levels, level colors, and anything else
you can pass into new winston.Logger()
.
var Log = ;// You can only call .configure once, and it must be before you make a new log.Log; // now in this file or any other that gets `required` after this one:var log = ;log;log;log;log;