Skip to content

Commit

Permalink
core: Fix compile errors from __log_rejection (#2933)
Browse files Browse the repository at this point in the history
  • Loading branch information
jplatte committed Sep 27, 2024
1 parent 4fc0641 commit 6f56077
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
5 changes: 5 additions & 0 deletions axum-core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@

#[macro_use]
pub(crate) mod macros;
#[doc(hidden)] // macro helpers
pub mod __private {
#[cfg(feature = "tracing")]
pub use tracing;
}

mod error;
mod ext_traits;
Expand Down
6 changes: 3 additions & 3 deletions axum-core/src/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ macro_rules! __log_rejection {
status = $status:expr,
) => {
{
tracing::event!(
$crate::__private::tracing::event!(
target: "axum::rejection",
tracing::Level::TRACE,
$crate::__private::tracing::Level::TRACE,
status = $status.as_u16(),
body = $body_text,
rejection_type = std::any::type_name::<$ty>(),
rejection_type = ::std::any::type_name::<$ty>(),
"rejecting request",
);
}
Expand Down
2 changes: 1 addition & 1 deletion axum-extra/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ json-lines = [
multipart = ["dep:multer"]
protobuf = ["dep:prost"]
query = ["dep:serde_html_form"]
tracing = ["dep:tracing", "axum-core/tracing", "axum/tracing"]
tracing = ["axum-core/tracing", "axum/tracing"]
typed-header = ["dep:headers"]
typed-routing = ["dep:axum-macros", "dep:percent-encoding", "dep:serde_html_form", "dep:form_urlencoded"]

Expand Down

0 comments on commit 6f56077

Please sign in to comment.