Commit 69b5adc
Add optional tracing support with slog bridge
Add an optional "tracing" feature that enables a bridge between the
tracing crate and slog, allowing users to use tracing macros while
maintaining slog's structured logging and bunyan format output.
Key changes:
- Add optional tracing dependencies behind "tracing" feature flag
- Implement SlogTracingBridge that converts tracing events to slog records
- Preserve structured data types (numbers, booleans) in log output
- Use proper detection with tracing::dispatcher::has_been_set()
- Initialize bridge automatically when feature is enabled
- Add comprehensive tests for bridge functionality
The bridge maintains backwards compatibility - existing slog usage
continues to work unchanged, and tracing is only available when
explicitly enabled via the feature flag.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <[email protected]>1 parent 615affb commit 69b5adc
4 files changed
+642
-3
lines changedSome generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| 46 | + | |
| 47 | + | |
46 | 48 | | |
47 | 49 | | |
48 | 50 | | |
| |||
136 | 138 | | |
137 | 139 | | |
138 | 140 | | |
| 141 | + | |
139 | 142 | | |
140 | 143 | | |
141 | 144 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
946 | 946 | | |
947 | 947 | | |
948 | 948 | | |
| 949 | + | |
| 950 | + | |
949 | 951 | | |
950 | 952 | | |
951 | 953 | | |
| |||
0 commit comments