Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: support env_logger #47

Open
Cryolitia opened this issue May 14, 2024 · 6 comments
Open

Feature request: support env_logger #47

Cryolitia opened this issue May 14, 2024 · 6 comments

Comments

@Cryolitia
Copy link

No description provided.

@orhun
Copy link

orhun commented May 14, 2024

Can you elaborate this request? 👀

@Cryolitia
Copy link
Author

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.

@orhun
Copy link

orhun commented Jun 2, 2024

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.)

@orhun
Copy link

orhun commented Jun 2, 2024

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? 🤔

@Cryolitia
Copy link
Author

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

@orhun
Copy link

orhun commented Jun 3, 2024

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 🐻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants