-
-
Notifications
You must be signed in to change notification settings - Fork 446
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: Optionally disable use of the log crate #215
Comments
Haha, that's something I haven't thought of! Seems like a reasonable way to fix this would be to add a feature to disable logging. |
Wow! That was fast. I was just looking into approaches to tackle the issue. Thank you very much, sir! |
It seems this no longer exists in the current version, is it possible to bring this back? |
I think a pluggable trait would be the preferred way to go here, like what's discussed in #1053. |
Is there any progress in that PR, or could I propose a quick feature based solution in the meantime? I'm using this crate in an FFI context with Node, and with large queries it keeps crashing the processes because rust expects stdout to be blocking, and node doesn't. Simply setting the node stdout to blocking isn't a great solution as it might block the node event loop as well. |
You could not log to stdout when running in an FFI context with Node. |
I am interested in using postgres as a logging backend in conjunction with the log crate. The issue is that anytime such a logger creates a query it results in infinite recursion due to the use of the
debug!
andinfo!
log macros in src/lib.rs. Would it be possible to optionally disable this feature in rust-postgres? I'm fairly new to Rust, so perhaps there is a workaround I am not considering instead.The text was updated successfully, but these errors were encountered: