custom_protocol_http/
trace.rs1#[cfg(feature = "tower")]
8use crate::{Denial, Unsupported};
9
10#[cfg(feature = "tower")]
11pub(crate) fn refused_foreign_origin(denial: &Denial) {
12 #[cfg(feature = "tracing")]
13 tracing::warn!(reason = %denial, "refused a request for another origin");
14 #[cfg(not(feature = "tracing"))]
15 let _ = denial;
16}
17
18#[cfg(feature = "tower")]
19pub(crate) fn refused_unsupported(unsupported: &Unsupported) {
20 #[cfg(feature = "tracing")]
21 tracing::warn!(capability = %unsupported, "refused a response this transport cannot carry");
22 #[cfg(not(feature = "tracing"))]
23 let _ = unsupported;
24}
25
26pub(crate) fn rewrote_origin(from: &crate::Origin, path: &str) {
32 #[cfg(feature = "tracing")]
33 tracing::debug!(
34 platform_origin = %from,
35 path,
36 "rewrote a request onto the canonical origin"
37 );
38 #[cfg(not(feature = "tracing"))]
39 let _ = (from, path);
40}