arti/crates/arti-config
Nick Mathewson 1a16f5a7d6 Tracing configuration for logfiles, per-target filters
Previously we could only configure one global tracing filter that
applied to stdout and journald.  There was no support for log files,
either.

This patch fixes both issues, by substantially revising the
configuration format: There are now separate filters for each log
file, for journald, and for the console log.  Because we want to
allow multiple logfiles, they have to go into an array in the
configuration.

The configuration logic has grown a bit complicated in its types,
since the tracing_subscriber crate would prefer to have the complete
structure of tracing Layers known statically. That's fine when you
know how many you have, and which kinds there will be, but for
the runtime-configuration case we need to mess around with
`Box<dyn Layer ...>`.

I also had to switch from tracing_subscriber's EnvFilter to its
Targets filter.  It seems "EnvFilter" can only be applied as a Layer
in itself, and won't work as a Filter on an individual Layer.

Closes #166.

Closes #170.
2022-01-10 13:23:11 -05:00
..
src Tracing configuration for logfiles, per-target filters 2022-01-10 13:23:11 -05:00
Cargo.toml Minimize the required version for each dependency. 2022-01-07 19:08:58 -05:00
README.md run ./maint/readmes.sh 2021-11-29 21:29:28 +10:00

README.md

arti-config

arti-config: Tools for configuration management in Arti

Overview

This crate is part of Arti, a project to implement Tor in Rust.

It provides a client configuration tool using using serde and config, plus extra features defined here for convenience.

License: MIT OR Apache-2.0