Skip to content

Commit

Permalink
fix(logging): remove additional space (#5568)
Browse files Browse the repository at this point in the history
  • Loading branch information
xxchan authored Jan 24, 2025
1 parent b8a3b7a commit 1026d8a
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions core/src/layers/logging.rs
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ impl LoggingInterceptor for DefaultLoggingInterceptor {
log!(
target: LOGGING_TARGET,
lvl,
"service={} name={} {}: {operation} {message} {}",
"service={} name={}{}: {operation} {message} {}",
info.scheme(),
info.name(),
LoggingContext(context),
Expand All @@ -220,7 +220,7 @@ impl LoggingInterceptor for DefaultLoggingInterceptor {
log!(
target: LOGGING_TARGET,
lvl,
"service={} name={} {}: {operation} {message}",
"service={} name={}{}: {operation} {message}",
info.scheme(),
info.name(),
LoggingContext(context),
Expand All @@ -232,12 +232,8 @@ struct LoggingContext<'a>(&'a [(&'a str, &'a str)]);

impl Display for LoggingContext<'_> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
for (i, (k, v)) in self.0.iter().enumerate() {
if i > 0 {
write!(f, " {}={}", k, v)?;
} else {
write!(f, "{}={}", k, v)?;
}
for (k, v) in self.0.iter() {
write!(f, " {}={}", k, v)?;
}
Ok(())
}
Expand Down

0 comments on commit 1026d8a

Please sign in to comment.