File tree Expand file tree Collapse file tree 2 files changed +25
-1
lines changed
Expand file tree Collapse file tree 2 files changed +25
-1
lines changed Original file line number Diff line number Diff line change @@ -68,11 +68,29 @@ cargo test --features test-utils
6868Run examples:
6969
7070``` bash
71- RUST_LOG=info cargo run -p simple_counter
71+ RUST_LOG=info cargo run -p live_scanning
7272# or
7373RUST_LOG=info cargo run -p historical_scanning
7474```
7575
76+ Logging / observability notes:
77+
78+ - The library's internal logs are ** compile-time opt-in** via the ` event-scanner ` crate feature ` tracing ` .
79+ - If the feature is disabled, internal logging calls compile to ** no-ops** .
80+ - Examples install a ` tracing_subscriber ` and read filters from ` RUST_LOG ` .
81+
82+ Enable ` event-scanner ` internal logs when running an example:
83+
84+ ``` bash
85+ RUST_LOG=event_scanner=debug cargo run -p historical_scanning --features event-scanner/tracing
86+ ```
87+
88+ You can also combine filters to keep other dependencies quiet:
89+
90+ ``` bash
91+ RUST_LOG=warn,event_scanner=info cargo run -p historical_scanning --features event-scanner/tracing
92+ ```
93+
7694Note: Examples start a local ` anvil ` instance and deploy a demo contract.
7795
7896---
Original file line number Diff line number Diff line change @@ -278,6 +278,12 @@ Run an example with:
278278RUST_LOG=info cargo run -p live_scanning
279279```
280280
281+ To also enable ` event-scanner ` internal logs in the examples:
282+
283+ ``` bash
284+ RUST_LOG=event_scanner=debug cargo run -p live_scanning --features event-scanner/tracing
285+ ```
286+
281287All examples spin up a local ` anvil ` instance, deploy a demo counter contract, and demonstrate using event streams to process events.
282288
283289---
You can’t perform that action at this time.
0 commit comments