Browse Source

Docs about logging options; default logging setting; Fixes #128

fix-133-memory-crash
Dan Janosik 6 years ago
parent
commit
b87e0cf0b4
No known key found for this signature in database GPG Key ID: C6F8CE9FFDB2CED2
  1. 5
      .env-sample
  2. 2
      app.js

5
.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

2
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");

Loading…
Cancel
Save