Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
1892 tracing #1957
Convert code base to use tokio-rs tracing library. With this applied (after running btc_eth/happy e2e test):
And we get the same total number of log lines from running btc_eth/happy e2e test as before.
Use tracing library for all log events. This is simply a matter of replacing logging calls that use `log::foo` with `tracing::foo`.
We can convert all upstream logging events to use tracing and be available for the default subscriber simply by using the line LogTracer::init()?; Connect upstream libraries to tracing using LogTracer.
Clippy is emitting warnings that the cognitive complexity is to high. Refactor the error variants into a separate function. This actually does not clear the warning but the code is cleaner anyways. Add an attribute to quieten Clippy to the newly created function.
1957: 1892 tracing r=tcharding a=tcharding Convert code base to use tokio-rs tracing library. With this applied (after running btc_eth/happy e2e test): ``` Jan 29 14:12:50.122 INFO cnd::trace: Initialized tracing with level: TRACE Jan 29 14:12:50.122 INFO cnd::seed: RootSeed file parent directory does not exist, creating recursively: /tmp/tmp-125556e02qp5UNTGu/seed.pem Jan 29 14:12:50.122 INFO cnd::seed: No seed file found, creating at: /tmp/tmp-125556e02qp5UNTGu/seed.pem Jan 29 14:12:50.288 INFO cnd::db: SQLite database file: /tmp/tmp-125556e02qp5UNTGu/cnd.sqlite Jan 29 14:12:50.290 INFO cnd::network: Starting with peer_id: QmafYkp7uHUj3FghWAbPZDbRTEFtJRdH3nQF5kXBYdXQYt Jan 29 14:12:50.293 DEBUG cnd::load_swaps: loading swaps from database ... Jan 29 14:12:50.295 INFO cnd: Starting HTTP server on 0.0.0.0:42789 Jan 29 14:12:53.583 TRACE cnd::http_api::routes::rfc003::handlers::post_swap: initiating new request: 932784b5-8ed9-47c1-8219-f216a9e0a017 Jan 29 14:12:53.589 INFO http: 127.0.0.1:39774 "POST /swaps/rfc003 HTTP/1.1" 201 "-" "axios/0.19.0" 39.353322ms Jan 29 14:12:53.589 DEBUG cnd::network: Making swap request to QmQskR8UngQvXfHrvrubAACkhQNVo4D2dPowjW81hWUxSu@/ip4/127.0.0.1/tcp/33085: SwapId(932784b5-8ed9-47c1-8219-f216a9e0a017) ``` And we get the same total number of log lines from running btc_eth/happy e2e test as before. Fixes: #1892 Co-authored-by: Tobin C. Harding <firstname.lastname@example.org>