zcashd/qa/zcash
Homu d36718542c Auto merge of #4597 - str4d:rust-tracing, r=str4d
Use the Rust tracing crate for C++ logging

This PR swaps in the `tracing` crate (via FFI) for logging to either standard
output or `debug.log`. It transparently maps all existing `LogPrintf` and
`LogPrint` invocations to info-level `tracing` events, and passes through
correct file and line information. `error` invocations are mapped to error-level
`tracing` events, currently without line information (due to the way that
`error` is used in the codebase; swapping individual callsites to the new
`LogError` macro will provide that information).

The end-goal for this change is that we don't need to make any disruptive
changes to the codebase, but we can start to leverage `tracing`-specific
functionality where we want to, such as providing extra fields on certain log
lines (that can be filtered for), adding spans to record the flow of execution
through `zcashd`, and logging within C++ and Rust simultaneously. Support
for extra fields on spans and events will be added in a subsequent PR.

The `-debug` config options are converted at launch into their corresponding
directives for tracing's `EnvFilter`. The new `setlogfilter` RPC method allows
this filter to be reloaded dynamically. The syntax is documented in the
`setlogfilter` help text, as well as here:

https://docs.rs/tracing-subscriber/0.2.7/tracing_subscriber/filter/struct.EnvFilter.html#directives

When `-printtoconsole` is specified, the output now includes timestamps and
ANSI encoding :)
2020-08-07 21:54:46 +00:00
..
checksec.sh qa/zcash/checksec.sh is under a BSD license, with a specialized non-endorsement clause. 2019-07-18 15:31:39 +01:00
create_benchmark_archive.py Updating remaining python3 conventions 2020-02-10 13:15:26 -08:00
create_wallet_200k_utxos.py Fix remaining python3 conventions 2020-02-10 12:38:46 -08:00
full_test_suite.py Revert "Add check-depends step to STAGE_COMMANDS list" 2020-08-07 17:03:50 +01:00
performance-measurements.sh Add Sapling benchmarks to benchmark runner 2019-02-16 18:44:16 +00:00
postponed-updates.txt qa: Add tracing dependencies to updatecheck.py 2020-08-07 15:26:28 +01:00
smoke_tests.py qa: Add --automate flag to smoke tests 2020-05-28 23:04:58 +12:00
test-depends-sources-mirror.py Update #! env for python3 2020-02-10 13:34:29 -08:00
updatecheck.py qa: Add tracing dependencies to updatecheck.py 2020-08-07 15:26:28 +01:00