Add IS_PROD to logger utility

This commit is contained in:
Blade Barringer
2015-11-08 08:49:16 -06:00
parent 0d7f984fce
commit 1ef6839eea

View File

@@ -3,12 +3,11 @@
import winston from 'winston'; import winston from 'winston';
import nconf from 'nconf'; import nconf from 'nconf';
// TODO move isProd to a single location const IS_PROD = nconf.get('IS_PROD');
const isProd = nconf.get('NODE_ENV') === 'production';
let logger = new winston.Logger(); let logger = new winston.Logger();
if (isProd) { if (IS_PROD) {
// TODO production logging, use loggly // TODO production logging, use loggly
// log errors to console too // log errors to console too
} else { } else {