miktam:loggly

Loggly for Meteor


License
MIT
Install
meteor add miktam:loggly@=2.0.0

Documentation

Loggly for Meteor

A Meteor logger for Loggly on the server/client side.

Client side support implemented by Michael Ghobrial

Module wraps loggly npm module and adds a few useful helpers, like log.error/log.trace/log.info/log.warn.

Loggly.{warn, error, info, trace} will produce error message with appropriate tag (warn, error, info or trace).

Installation

meteor add miktam:loggly

Configuration

Once you have added the package, you will need to extend the Meteor.settings object with the following (e.g. in settings.json in your project root directory):

{
  "token": "your-really-long-input-token",
  "subdomain": "your-subdomain",
  "auth": {
    "username": "your-username",
    "password": "your-password"
  },
  //
  // Optional: Tag to send with EVERY log message
  //
  "tags": ["global-tag"],
  // Optional: logs will be stored in JSON format
  "json": "true"
}

Usage (client/server side)

Logger.log("first log from meteor", "custom_tag");
Logger.info("it will store this message with info tag");
Logger.trace({data: myJSONData});
Logger.error({message: "my fancy object", fancy: true});

Licence

The MIT License (MIT)

Copyright (c) 2016, Andrei Karpushonak aka @miktam