Reduce external logging (#1974)

### Description

Cuts out a few very verbose log targets that are not relevant for us at
the debug level. Specifically `rusoto_core` and `reqwest` debug logs.

### Drive-by changes

None

### Related issues

- Mentioned in #1896

### Backward compatibility

_Are these changes backward compatible?_

Yes

_Are there any infrastructure implications, e.g. changes that would
prohibit deploying older commits using this infra tooling?_

None


### Testing

_What kind of testing have these changes undergone?_

Manual
pull/1981/head
Mattie Conover 2 years ago committed by GitHub
parent 4657fcc737
commit 92542e5d3e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      rust/hyperlane-base/src/settings/trace/mod.rs

@ -78,8 +78,10 @@ impl TracingConfig {
pub fn start_tracing(&self, metrics: &CoreMetrics) -> Result<()> { pub fn start_tracing(&self, metrics: &CoreMetrics) -> Result<()> {
let mut target_layer = Targets::new().with_default(self.level); let mut target_layer = Targets::new().with_default(self.level);
if self.level < Level::Trace { if self.level < Level::Trace {
// only show hyper debug and trace logs at trace level // only show these debug and trace logs at trace level
target_layer = target_layer.with_target("hyper", Level::Info) target_layer = target_layer.with_target("hyper", Level::Info);
target_layer = target_layer.with_target("rusoto_core", Level::Info);
target_layer = target_layer.with_target("reqwest", Level::Info);
} }
let fmt_layer: LogOutputLayer<_> = self.fmt.into(); let fmt_layer: LogOutputLayer<_> = self.fmt.into();
let err_layer = tracing_error::ErrorLayer::default(); let err_layer = tracing_error::ErrorLayer::default();

Loading…
Cancel
Save