status-im / nim-chronicles

A crafty implementation of structured logging for Nim.
Apache License 2.0
161 stars 20 forks source link

Silence info logging at the file-level #109

Closed jfilby closed 2 years ago

jfilby commented 2 years ago

I would like for info logging statements to be silenced by setting a switch at the file level. This would interpret info calls as debug calls.

This would be very useful for turning off a of info calls when they unnecessarily fill the log. However these calls can be quickly re-enabled when needed.

arnetheduck commented 2 years ago

You can accomplish this with dynamic loggers like so: https://github.com/status-im/nimbus-eth2/blob/a88427bd39c6d5a47aa194b0570207fd69742466/beacon_chain/nimbus_binary_common.nim#L85

jfilby commented 2 years ago

Thanks.