0.0.2 • Published 10 years ago
modreal-logger v0.0.2
modreal-logger
This is an opinionated simple logger package. It assumes:
- you want to log to the console
- you use loggly and have a config/loggly.json file
Loggly Config
Put the following in config/loggly.json
:
{
"subdomain": "your-subdomain",
"inputToken": "your-input-token-here",
"json": true
}
Usage
Require the logger, and log to it!
var logger = require("modreal-logger");
logger.info("{winston} logger is working!");
For easy searches with loggly, you can include metadata as well:
logger.info("{winston} logger ready", { module: "winston" });
And then you could search it on loggly with:
json.module:winston
License
MIT
AJ Ostrow, November 2013
0.0.2
10 years ago