mirrord
mirrord copied to clipboard
Alternative log level env var for `mirrord-layer`
Currently it's not possible to silence logs from mirrord-layer
when developing a rust application as it uses the RUST_LOG
env variable.
Something like MIRRORD_RUST_LOG
could be introduced that overrides RUST_LOG
if present.
Alternatively logging to file could be preferred instead of silencing, as these messages are still important, but should not be mixed with the executed app's stderr or stdout.
AFAIK you can use RUST_LOG=mirrord=warning
then mirrord will print only warnings/errors?
After some thinking, the current behaviour feels wrong but I don't have alternative suggestions yet. RUST_LOG=info,mirrord=error
or similar could work, but for some reason I think the logs should be separate. I think additional support for logging to a file instead of stderr should be enough.
I thought about it as well - I came to the idea of having a -v,vv,vvv,vvvv,vvvvv
flags that will enable the logs as most users aren't aware of rust logging facility, maybe as part of it we can separate it from using RUST_LOG