LND
ships with a few useful features for debugging, such as a built-in profiler and tunable logging levels. If you need to submit a bug report for LND
, it may be helpful to capture debug logging and performance data ahead of time.~/.lnd/logs/bitcoin/mainnet/lnd.log
, on macOS at ​​~/Library/Application Support/Lnd/logs/bitcoin/mainnet
or in their specified location using the--logdir
flag at startup.lnd.log.<i>.gz
in the same directory.lnd.conf
file.logdir=~/.lnd/logs
maxlogfiles=3
maxlogfilesize=10
debuglevel=debug,PEER=info
lncli debuglevel --level=
trace
, debug
, info
, warn
, error
, critical
, off
lncli debuglevel –-level=debug
lncli debuglevel --show
debuglevel --level=BTCN=trace,LNWL=debug
lnd
lnd
has a built-in feature which allows you to capture profiling data at runtime using pprof, a profiler for Go. The profiler has negligible performance overhead during normal operations (unless you have explicitly enabled CPU profiling).lnd
with the --profile
option using a free port.lnd
running, you can use the pprof endpoint on port 9736 to collect runtime profiling data. You can fetch this data using curl
like so: