Logging Configuration

Log config file location

Logging in Nethermind is done via NLog library that can be configured by editing the NLog.config file.
Environment Type
NLog.config location
built from src - Debug mode
src\Nethermind\Nethermind.Runner\bin\Debug\netcoreapp3.1\NLog.config
built from src - Release mode
src\Nethermind\Nethermind.Runner\bin\Release\netcoreapp3.1\NLog.config
Docker
/nethermind/NLog.config
top level directory after unzipping the package
top level directory after unzipping the package
dAppNode
? [to be documented]

Log config file syntax

Detailed NLog configuration options can be found here: https://nlog-project.org/config/

Global logging override

Additionally there are global logging override that you can use temporarily:
Command line override
Log level
./Nethermind.Runner --config mainnet --log TRACE
TRACE
./Nethermind.Runner --config mainnet --log DEBUG
DEBUG
./Nethermind.Runner --config mainnet --log INFO
INFO
./Nethermind.Runner --config mainnet --log WARN
WARN
./Nethermind.Runner --config mainnet --log ERROR
ERROR

JSON RPC logging level

This can be done by including these lines in the logging configuration file:
1
<logger name="JsonRpc.*" minlevel="Error" writeTo="file-async"/>
2
<logger name="JsonRpc.*" minlevel="Error" writeTo="auto-colored-console-async" final="true"/>
3
<logger name="JsonRpc.*" final="true"/>
Copied!

Enterprise Logging

See how to configure Seq here
Last modified 10mo ago