mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 15:17:25 +01:00
do not output server logs when testing, ability to run tests and server separately
This commit is contained in:
@@ -4,12 +4,15 @@ import winston from 'winston';
|
||||
import nconf from 'nconf';
|
||||
|
||||
const IS_PROD = nconf.get('IS_PROD');
|
||||
const IS_TEST = nconf.get('IS_TEST');
|
||||
|
||||
let logger = new winston.Logger();
|
||||
|
||||
if (IS_PROD) {
|
||||
// TODO production logging, use loggly
|
||||
// log errors to console too
|
||||
} else if (IS_TEST) {
|
||||
// Do not log anything when testing
|
||||
} else {
|
||||
logger
|
||||
.add(winston.transports.Console, {
|
||||
|
||||
Reference in New Issue
Block a user