Skip to content

Latest commit

 

History

History
54 lines (35 loc) · 823 Bytes

README.md

File metadata and controls

54 lines (35 loc) · 823 Bytes

Meteor Loglevel

Meteor package for pimterry's loglevel.

It is a minimal wrapper around loglevel.

Example

Configure your Meteor settings file, e.g.

  ...

  "public": {
    "loglevel": {  // client logging
      "default": "debug"
    }
  },

  ...

  "loglevel": {  // server logging
    "default": "debug",
    "levels": {
      "fixtures": "info"
    }
  }

  ...

and then use it! in your server_file.js:

import log from 'meteor/mjyc:loglevel';

logger = log.getLogger('my_meteor_methods');

...

logger.debug(`method was called with args! ${args}`);

and in your client_file.jsx:

import log from 'meteor/mjyc:loglevel';

logger = log.getLogger('MyReactComponent');

...

logger.warn(`MyReactComponent did not received props?! ${props}`);