Browse Source
Docs about logging options; default logging setting; Fixes #128
fix-133-memory-crash
Dan Janosik
6 years ago
No known key found for this signature in database
GPG Key ID: C6F8CE9FFDB2CED2
2 changed files with
6 additions and
1 deletions
-
.env-sample
-
app.js
|
|
@ -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 |
|
|
|
|
|
|
|
|
|
@ -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"); |
|
|
|