diff --git a/.env-sample b/.env-sample index 3c76162..6538c6e 100644 --- a/.env-sample +++ b/.env-sample @@ -1,3 +1,8 @@ +# Optional logging settings, see comments after each for more info +#DEBUG=* # Enable all logging, including middleware, etc +#DEBUG=btcexp:* # Enable all logging specific to btc-rpc-explorer +#DEBUG=btcexp:app,btcexp:error # Default logging setting if "DEBUG" is not set + # The active coin: BTC/LTC #BTCEXP_COIN=BTC diff --git a/app.js b/app.js index 13db2ab..514198e 100755 --- a/app.js +++ b/app.js @@ -16,7 +16,7 @@ configPaths.filter(fs.existsSync).forEach(path => { // debug module is already loaded by the time we do dotenv.config // so refresh the status of DEBUG env var var debug = require("debug"); -debug.enable(process.env.DEBUG); +debug.enable(process.env.DEBUG || "btcexp:app,btcexp:error"); var debugLog = debug("btcexp:app"); var debugPerfLog = debug("btcexp:actionPerformace");