modreal-logger

0.0.2 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i modreal-logger

Weekly Downloads

1

Version

0.0.2

License

none

Last publish

Collaborators

  • aj0strow