Skip to content

Commit 2cc1a10

Browse files
committed
Implement adr-9: optionally move to the new tracing-support module for logging.
Summary of changes: * Existing `error-support` crate re-exports `log`, `info`, `warn`, `trace` etc. All existing components are changed so that instead of using `log::` directly we use the re-exports from `error-support`. * `error-support` also grows a `testing` feature to expose a couple of helpers for tests. * new crate `tracing-support` which also re-exports `log`, `info`, `warn`, `trace` etc and also has a `testing` feature which re-exports the same test functions. * `error-support` also grows new features to control whether it re-exports the log calls from the `log` and `env_logger` crates, or from `tracing-support`. The intent here is that in app-services we will use the feature which uses `tracing` (because we also have `rust_log_forwarder` setup to support that, but initially on desktop we will enable the feature to continue using `log` while we work on setting up an appropriate tracing subscriber there. There's also a feature to control how error reporting is done - by default it is done like has always been done on mobile, but is setup so that on Desktop it will use the tracing facility. This means we can eventually end up using a single tracing subscriber for both error reports and logs (and also any other event types we invent in the future).
1 parent 9877328 commit 2cc1a10

File tree

163 files changed

+1267
-864
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

163 files changed

+1267
-864
lines changed

Cargo.lock

Lines changed: 89 additions & 29 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ members = [
2121
"components/support/error",
2222
"components/support/error/tests",
2323
"components/support/find-places-db",
24+
"components/support/firefox-versioning",
2425
"components/support/guid",
2526
"components/support/interrupt",
2627
"components/support/jwcrypto",
@@ -37,6 +38,7 @@ members = [
3738
"components/support/rc_crypto/nss/systest",
3839
"components/support/rust-log-forwarder",
3940
"components/support/sql",
41+
"components/support/tracing",
4042
"components/support/types",
4143
"components/support/viaduct-reqwest",
4244
"components/sync_manager",
@@ -59,7 +61,6 @@ members = [
5961
"examples/*/",
6062
"testing/separated/*/",
6163
"testing/sync-test",
62-
"components/support/firefox-versioning",
6364
]
6465

6566
exclude = [

0 commit comments

Comments
 (0)