Skip to content
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

Add logging level #22

Merged
merged 1 commit into from Jul 23, 2021
Merged

Conversation

mojoX911
Copy link
Contributor

@mojoX911 mojoX911 commented Jul 2, 2021

Update println!s to log::trace. Fixes #20

log seems like the lightest of all the crates available.

Changed printlns to log::trace mostly. As it seems most errors and messages are to be displayed by default.

We might decide to add other log levels later from different internal parts.

Added target in logging as the module name generating the message.

Kept few printlns intact as they are used for user level communication.

This changes adds log crate to dependencies and use it to have
logging in different levels.
@codecov-commenter
Copy link

Codecov Report

Merging #22 (a5aea8c) into master (9ddd6db) will decrease coverage by 0.83%.
The diff coverage is 60.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #22      +/-   ##
==========================================
- Coverage   84.22%   83.38%   -0.84%     
==========================================
  Files           8        8              
  Lines        2504     2504              
==========================================
- Hits         2109     2088      -21     
- Misses        395      416      +21     
Impacted Files Coverage Δ
src/main.rs 48.07% <0.00%> (ø)
src/offerbook_sync.rs 83.09% <33.33%> (ø)
src/wallet_sync.rs 81.53% <50.00%> (-0.18%) ⬇️
src/taker_protocol.rs 95.02% <91.66%> (-1.09%) ⬇️
src/maker_protocol.rs 85.67% <100.00%> (-0.82%) ⬇️
src/messages.rs 86.90% <0.00%> (-11.91%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9ddd6db...a5aea8c. Read the comment docs.

@chris-belcher
Copy link
Contributor

Thanks for the PR. I'll try it out soon and then merge.

@chris-belcher chris-belcher merged commit c7d5f23 into bitcoin-teleport:master Jul 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add multiple debug message levels
3 participants