mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 23:27:26 +01:00
Add IS_PROD to logger utility
This commit is contained in:
@@ -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 {
|
||||||
|
|||||||
Reference in New Issue
Block a user