apester-logger

1.1.0 • Public • Published

apester-logger

logging module using winston and logzio-nodejs, created for consistency for logs in our services.

Sample usage

var config = {
    path: './log/',
    options: {
        logzio: {
            token: '_LOGZIO_API_TOKEN',
            type: 'service-name',
            json: 'true',
            debug: 'false',
            level: 'info'
        }
    }
};
 
var logger = require('./dist/index')(config);
 
// Now, log :)
logger.error('TEST ERROR', {test: 'yes'}, null);
logger.bootstrap('TEST BOOTSTRAP', {test: 'yes'}, null);
logger.private_api('TEST PRIVATE API', {test: 'yes'}, null);
logger.log('TEST LOG', {test: 'yes'}, 'error', null);
 

Details

path: the path of the local log directory, creates new folder if not exists. options: object which defines logzio-winston transport library.

NOTE

ALL public function will probably change according to product decisions.

Readme

Keywords

Package Sidebar

Install

npm i apester-logger

Weekly Downloads

0

Version

1.1.0

License

ISC

Last publish

Collaborators

  • mrsufgi
  • orsahar