Skip to content

Instantly share code, notes, and snippets.

@deepakshrma
Created July 27, 2016 15:36
Show Gist options
  • Save deepakshrma/9ed353dbf12744c3d512cd376976662a to your computer and use it in GitHub Desktop.
Save deepakshrma/9ed353dbf12744c3d512cd376976662a to your computer and use it in GitHub Desktop.
'use strict';
var winstonConf = {};
function _define(config, name, value) {
Object.defineProperty(config, name, {
value: value,
enumerable: true,
writable: false,
configurable: false
});
}
_define(winstonConf, 'config', {
defaults: {
levels: {
debug: 0,
info: 1,
warn: 2,
error: 3
},
colors: {
debug: 'cyan',
info: 'green',
warn: 'yellow',
error: 'red'
}
},
env: {
production: {
level: 'error',
handleExceptions: true,
json: false,
colorize: true
},
development: {
level: 'info',
handleExceptions: false,
json: false,
colorize: true
},
worker: {
level: 'info',
handleExceptions: false,
json: false,
colorize: true
}
}
});
module.exports = winstonConf.config;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment