oxen-io / oxen-storage-server

Storage server for Oxen Service Nodes
MIT License
29 stars 50 forks source link

`trace` loglevel not logging trace logs #483

Closed martin-braun closed 1 year ago

martin-braun commented 1 year ago

Describe the bug --log-level trace will only log debug and no trace messages, although the daemon reports "Setting log level to trace". Also giving a wrong log level will just exit the storage server without any printed message, because it tries to log a critical error about the wrong log level before the logger has been initialized.

So far, I couldn't pin point the root for the main issue (oxenss or oxen-logger).

To Reproduce

Desktop (please complete the following information):

jagerman commented 1 year ago

Trace logging is only enabled in a debug build, by design: so that we can not be afraid of making trace logging calls in code hot paths (when in a non-debug build, the trace call is a no-op).

martin-braun commented 1 year ago

@jagerman Thanks a lot. I wasn't able to pin-point the location where this is happening, but it kinda makes sense. You guessed it right, I was testing with a release build.