More flexible tracing configuration.
If ARTI_LOG is set it will override the tracing level settings from the config file. While the latter allows picking between debug and trace levels, using an environment variable lets us do more targeted filtering of the traces, for example
ARTI_LOG="info,tor_proto::channel=trace" ./target/debug/arti
Observations
- try_from_env will not return an error even if the tracing directive is something like 'foobar', as it will consider it a module target. So typos in the content of the var will result in no logs at all, but it should be easy to see the cause.
- Maybe RUST_LOG is preferred instead of a custom env var? I can redo the MR if so.
Edited by janimo