Open selfuryon opened 6 months ago
Technically, you can modify the NLog.config
and have it log to whatever format you want and to wherever. Maybe add a commented out config to achive this?
I use to dump trace json files which get scraped by elasticsearch on some really hard problem. So the main change is in the NLog.config
.
Is your feature request related to a problem? Please describe. I'm running Nethermind nodes in Kubernetes. I collect all logs to a central storage and look at all of them via central UI (Loki for example). In that case, it's a standard practice to collect logs in a structured format like JSON. I'd love to have the possibility to change the current log format via some option to JSON.
Describe the solution you'd like Add some option like
--log-format
where I can specify what type of format I want to have in stdout (likeconsole
orjson
).Describe alternatives you've considered parse current lines and sometimes join multiple lines together, but it's hard to extract metadata from logs.
Additional context Looks like some work with NLOG.