-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Setup log levels at environment #32
Conversation
Codecov Report
@@ Coverage Diff @@
## master #32 +/- ##
==========================================
- Coverage 78.71% 76.21% -2.50%
==========================================
Files 8 8
Lines 2720 2800 +80
==========================================
- Hits 2141 2134 -7
- Misses 579 666 +87
Continue to review full report at Codecov.
|
Concept + code review ACK 2ba210d |
reACK a1c0a5f |
Please explain why the Looks good to me though, please squish the commits. |
|
Rebased and squashed. |
I did a coinswap on this branch but the makers only printed out a little bit of information, here is an example:
It's a bit strange to me since I can see in the maker_protocol.rs file the function |
Huh, that's weird.. Let me get into my debugger, and get back to this. |
Fixed the bug. Updated logging initialization. Default logging is Can be changed to other levels by changing this value teleport-transactions/src/main.rs Line 357 in 330d56c
to filter specific object in debug log use Beyond that I have been playing around with log messages and it seems the info level messages can be refactored to show more readable protocol communication by default. This can be helpful for new devs trying to understand the communication flow. Updated the This gives us log displays like below in
The Taker logs are structured like Maker Log:
Maker logs are simple I tried to cover all the message comms, so the flow can be seen. This unfortunately makes this PR little large. Happy to take it into a new PR if needed. @chris-belcher @GeneFerneau let me know what you think. |
2c1b09d
to
44a2f21
Compare
This adds an env_logger and sets it up in main. Its run within a std::sync::Once to ensure its only setup once even though main executes multiple times. Logger will throw error otherwise. Adds logging in the test.
- Logging framework is refactored to categorize loggings into `info`, `debug`, `warn` and `error`. - Default logging level is `info` - Generic Logging format: "===> [Peer Port] | <Description>" - Object details are hidden in `debug` level Objective of more extensive logging is to observe protocol communications in more readable mode. Can be helpful for new devs.
Updated with more clean logging.. That context thing for takers wasn't really helpful.. Now the logs are more concise:
|
I finally got round to trying this out. Thanks for the PR. |
Fixes #30 .
This should fix the logging issues.