mirror of
https://github.com/facebook/sapling.git
synced 2024-10-11 01:07:15 +03:00
4f35095c38
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: https://github.com/tokio-rs/tracing/issues/302 Reviewed By: sfilipco Differential Revision: D26518017 fbshipit-source-id: 9016b940621fc9a883e6ca3f00eaaeccc051ae74 |
||
---|---|---|
.. | ||
src | ||
Cargo.toml |