mirror of
https://github.com/tokio-rs/axum.git
synced 2024-11-21 22:56:46 +01:00
core: Fix compile errors from __log_rejection (#2933)
This commit is contained in:
parent
4fc0641874
commit
6f5607785d
3 changed files with 9 additions and 4 deletions
|
@ -50,6 +50,11 @@
|
||||||
|
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
pub(crate) mod macros;
|
pub(crate) mod macros;
|
||||||
|
#[doc(hidden)] // macro helpers
|
||||||
|
pub mod __private {
|
||||||
|
#[cfg(feature = "tracing")]
|
||||||
|
pub use tracing;
|
||||||
|
}
|
||||||
|
|
||||||
mod error;
|
mod error;
|
||||||
mod ext_traits;
|
mod ext_traits;
|
||||||
|
|
|
@ -9,12 +9,12 @@ macro_rules! __log_rejection {
|
||||||
status = $status:expr,
|
status = $status:expr,
|
||||||
) => {
|
) => {
|
||||||
{
|
{
|
||||||
tracing::event!(
|
$crate::__private::tracing::event!(
|
||||||
target: "axum::rejection",
|
target: "axum::rejection",
|
||||||
tracing::Level::TRACE,
|
$crate::__private::tracing::Level::TRACE,
|
||||||
status = $status.as_u16(),
|
status = $status.as_u16(),
|
||||||
body = $body_text,
|
body = $body_text,
|
||||||
rejection_type = std::any::type_name::<$ty>(),
|
rejection_type = ::std::any::type_name::<$ty>(),
|
||||||
"rejecting request",
|
"rejecting request",
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,7 +34,7 @@ json-lines = [
|
||||||
multipart = ["dep:multer"]
|
multipart = ["dep:multer"]
|
||||||
protobuf = ["dep:prost"]
|
protobuf = ["dep:prost"]
|
||||||
query = ["dep:serde_html_form"]
|
query = ["dep:serde_html_form"]
|
||||||
tracing = ["dep:tracing", "axum-core/tracing", "axum/tracing"]
|
tracing = ["axum-core/tracing", "axum/tracing"]
|
||||||
typed-header = ["dep:headers"]
|
typed-header = ["dep:headers"]
|
||||||
typed-routing = ["dep:axum-macros", "dep:percent-encoding", "dep:serde_html_form", "dep:form_urlencoded"]
|
typed-routing = ["dep:axum-macros", "dep:percent-encoding", "dep:serde_html_form", "dep:form_urlencoded"]
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue