Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
hgcommands: set tracing level to TRACE if EDENSCM_LOG is set
Summary: Previously, one has to set both EDENSCM_LOG=trace and EDENSCM_TRACE_LEVEL=trace to enable all logging. That is because the filtering is global - one subscriber (or layer) filtering out a span or event, then the span or event is gone forever. For now, let's just set the TracingCollector Subscriber's filter level (EDENSCM_TRACE_LEVEL) to TRACE so it solely depends on the EnvFilter (EDENSCM_LOG) if EDENSCM_LOG is set. That's more friendly. See `impl<L: Layer<S>, S: Subscriber> Subscriber for Layered<L, S>`: fn enabled(&self, metadata: &Metadata<'_>) -> bool { if self.layer.enabled(metadata, self.ctx()) { // if the outer layer enables the callsite metadata, ask the subscriber. self.inner.enabled(metadata) } else { // otherwise, the callsite is disabled by the layer false } } See also: tokio-rs/tracing#302 Reviewed By: sfilipco Differential Revision: D26518017 fbshipit-source-id: 9016b940621fc9a883e6ca3f00eaaeccc051ae74
- Loading branch information