Skip to content

Commit

Permalink
fix(logging): remove additional space
Browse files Browse the repository at this point in the history
Signed-off-by: xxchan <[email protected]>
  • Loading branch information
xxchan committed Jan 24, 2025
1 parent b8a3b7a commit a21d590
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 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 @@ -233,11 +233,7 @@ 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)?;
}
write!(f, " {}={}", k, v)?;
}
Ok(())
}
Expand Down

0 comments on commit a21d590

Please sign in to comment.