1.1.0 • Published 8 years ago
apester-logger v1.1.0
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.