LNDships 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/mainnetor in their specified location using the
--logdirflag at startup.
lnd.log.<i>.gzin the same directory.
logdir=~/.lnd/logs maxlogfiles=3 maxlogfilesize=10 debuglevel=debug,PEER=info
lncli debuglevel --level=
lncli debuglevel –-level=debug
lncli debuglevel --show
lndhas 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).
--profileoption using a free port.
lndrunning, you can use the pprof endpoint on port 9736 to collect runtime profiling data. You can fetch this data using