move env.DEBUG check out of config

This commit is contained in:
jomo 2015-02-02 00:33:16 +01:00
parent 27aa12a76b
commit 80a75cc60e
2 changed files with 20 additions and 20 deletions

View File

@ -12,7 +12,7 @@ var config = {
cleaning_redis_limit: 24576, // max allowed used KB on redis to trigger redis flush cleaning_redis_limit: 24576, // max allowed used KB on redis to trigger redis flush
cleaning_amount: 50000, // amount of avatar (and their helm) files to clean cleaning_amount: 50000, // amount of avatar (and their helm) files to clean
http_timeout: 1000, // ms until connection to mojang is dropped http_timeout: 1000, // ms until connection to mojang is dropped
debug_enabled: process.env.DEBUG === "true" || false, // enables logging.debug debug_enabled: false, // enables logging.debug
faces_dir: "images/faces/", // directory where faces are kept. should have trailing "/" faces_dir: "images/faces/", // directory where faces are kept. should have trailing "/"
helms_dir: "images/helms/", // directory where helms are kept. should have trailing "/" helms_dir: "images/helms/", // directory where helms are kept. should have trailing "/"
skins_dir: "images/skins/", // directory where skins are kept. should have trailing "/" skins_dir: "images/skins/", // directory where skins are kept. should have trailing "/"

View File

@ -29,7 +29,7 @@ exp.warn = function() {
exp.error = function() { exp.error = function() {
log("ERROR", arguments); log("ERROR", arguments);
}; };
if (config.debug_enabled) { if (config.debug_enabled || process.env.DEBUG === "true") {
exp.debug = function() { exp.debug = function() {
log("DEBUG", arguments); log("DEBUG", arguments);
}; };