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

Logger: properly print debug from errors #721

Merged
merged 1 commit into from
Oct 15, 2020

Conversation

Fishrock123
Copy link
Member

Also adds the error type name.

Fixes: #703

Also adds the error type name.

Fixes: http-rs#703
@@ -50,7 +50,8 @@ impl LogMiddleware {
if status.is_server_error() {
if let Some(error) = response.error() {
log::error!("Internal error --> Response sent", {
message: format!("\"{}\"", error.to_string()),
message: format!("{:?}", error),
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When using the Debug formatter on Nightly with RUST_BACKTRACE enabled, this will also print out with a backtrace.

@Fishrock123
Copy link
Member Author

I now have two codebases using custom loggers awaiting this, haha.

@jbr jbr merged commit d0966b9 into http-rs:main Oct 15, 2020
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

Successfully merging this pull request may close these issues.

tide::log::middleware: line number/backtrace for errors
2 participants