Feature request: support `env_logger`
Cryolitia opened this issue · comments
Can you elaborate this request? 👀
env_logger
is a widely used logger in Rust. Can we redirect gpgme's logs to env_logger so that upper-layer applications can process application logs more conveniently and uniformly.
Would it be better to use the log
crate (or tracing
) instead? So that users can decide which logger implementation they want to use (e.g. env_logger
, tracing_subscriber
, etc.)
Also, I didn't quite get what you mean by gpgme's logs. Do you mean the error logs generated by eprintln
or am I missing something here? 🤔
Would it be better to use the log crate (or tracing) instead?
agree
Also, I didn't quite get what you mean by gpgme's logs. Do you mean the error logs generated by eprintln or am I missing something here? 🤔
bind it https://www.gnupg.org/documentation/manuals/gpgme/Debugging.html to rust logger
I don't know much about the implementation details but I'm guessing those logs are coming from the underlying sys library (libgpgme-dev
) and gpgme-rs
has just the bindings for it.
Not sure if we can somehow have a middle layer where we send the logs via log
, it's probably better for someone more knowledgeable to answer that 🐻