diff --git a/src/proto/h1/mod.rs b/src/proto/h1/mod.rs index fe397d24c4..017b8671fb 100644 --- a/src/proto/h1/mod.rs +++ b/src/proto/h1/mod.rs @@ -30,6 +30,7 @@ cfg_server! { pub(crate) trait Http1Transaction { type Incoming; type Outgoing: Default; + #[cfg(feature = "tracing")] const LOG: &'static str; fn parse(bytes: &mut BytesMut, ctx: ParseContext<'_>) -> ParseResult; fn encode(enc: Encode<'_, Self::Outgoing>, dst: &mut Vec) -> crate::Result; diff --git a/src/proto/h1/role.rs b/src/proto/h1/role.rs index 26be74d87f..e5a8872111 100644 --- a/src/proto/h1/role.rs +++ b/src/proto/h1/role.rs @@ -104,6 +104,7 @@ pub(crate) enum Server {} impl Http1Transaction for Server { type Incoming = RequestLine; type Outgoing = StatusCode; + #[cfg(feature = "tracing")] const LOG: &'static str = "{role=server}"; fn parse(buf: &mut BytesMut, ctx: ParseContext<'_>) -> ParseResult { @@ -964,6 +965,7 @@ trait HeaderNameWriter { impl Http1Transaction for Client { type Incoming = StatusCode; type Outgoing = RequestLine; + #[cfg(feature = "tracing")] const LOG: &'static str = "{role=client}"; fn parse(buf: &mut BytesMut, ctx: ParseContext<'_>) -> ParseResult {