modreal-logger

This is an opinionated simple logger package. It assumes:

npm install modreal-logger
4 downloads in the last month

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

npm loves you