diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f43db924e588a..d1611bcd09398 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -448,7 +448,7 @@ warn!("Failed to merge value: {}.", err); Yep! ```rust -warn!(message = "Failed to merge value.", error = ?error); +warn!(message = "Failed to merge value.", %error); ``` #### Feature flags diff --git a/lib/file-source/src/file_server.rs b/lib/file-source/src/file_server.rs index 12de395633b6c..434cc99d896b9 100644 --- a/lib/file-source/src/file_server.rs +++ b/lib/file-source/src/file_server.rs @@ -342,7 +342,7 @@ where match result { Ok(()) => {} Err(error) => { - error!(message = "Output channel closed.", error = ?error); + error!(message = "Output channel closed.", %error); return Err(error); } } diff --git a/src/sinks/util/adaptive_concurrency/controller.rs b/src/sinks/util/adaptive_concurrency/controller.rs index 162f016b7d867..66908fa74d06d 100644 --- a/src/sinks/util/adaptive_concurrency/controller.rs +++ b/src/sinks/util/adaptive_concurrency/controller.rs @@ -251,7 +251,7 @@ where } else { warn!( message = "Unhandled error response.", - ?error, + %error, internal_log_rate_secs = 5 ); false diff --git a/tests/support/mod.rs b/tests/support/mod.rs index c47396453a439..6b4e34c59e9a1 100644 --- a/tests/support/mod.rs +++ b/tests/support/mod.rs @@ -174,11 +174,7 @@ impl SourceConfig for MockSourceConfig { } }) .map(Ok) - .forward( - out.sink_map_err( - |error| error!(message = "Error sending in sink..", error = ?error), - ), - ) + .forward(out.sink_map_err(|error| error!(message = "Error sending in sink..", %error))) .inspect(|_| info!("Finished sending.")) .await })) @@ -290,7 +286,7 @@ impl TransformConfig for MockTransformConfig { pub struct MockSinkConfig where T: Sink + Unpin + std::fmt::Debug + Clone + Send + Sync + 'static, - >::Error: std::fmt::Debug, + >::Error: std::fmt::Display, { #[serde(skip)] sink: Option, @@ -301,7 +297,7 @@ where impl MockSinkConfig where T: Sink + Unpin + std::fmt::Debug + Clone + Send + Sync + 'static, - >::Error: std::fmt::Debug, + >::Error: std::fmt::Display, { pub fn new(sink: T, healthy: bool) -> Self { Self { @@ -322,7 +318,7 @@ enum HealthcheckError { impl SinkConfig for MockSinkConfig where T: Sink + Unpin + std::fmt::Debug + Clone + Send + Sync + 'static, - >::Error: std::fmt::Debug, + >::Error: std::fmt::Display, { async fn build(&self, cx: SinkContext) -> Result<(VectorSink, Healthcheck), vector::Error> { let sink = MockSink { @@ -361,12 +357,12 @@ struct MockSink { impl StreamSink for MockSink where S: Sink + Send + std::marker::Unpin, - >::Error: std::fmt::Debug, + >::Error: std::fmt::Display, { async fn run(&mut self, mut input: BoxStream<'_, Event>) -> Result<(), ()> { while let Some(event) = input.next().await { if let Err(error) = self.sink.send(event).await { - error!(message = "Ingesting an event failed at mock sink.", ?error); + error!(message = "Ingesting an event failed at mock sink.", %error); } self.acker.ack(1);