Change log for UDP tracker#549
Merged
josecelano merged 2 commits intotorrust:developfrom Dec 22, 2023
Merged
Conversation
Member
Author
|
I've changed my mind regarding the tracker log's verbosity. This change makes the log files even bigger. I solved the problem of running out of disk with "limit" attributes for the logs in the compose file. logging:
options:
max-size: "10m"
max-file: "10"And I think the new format is very useful for fixing bugs and extracting statistics from logs. |
dde5454 to
aaca370
Compare
From: ```s 2023-12-22T12:32:53.016911160+00:00 [torrust_tracker::servers::udp::server][INFO] Received 109 bytes 2023-12-22T12:32:53.016953899+00:00 [torrust_tracker::servers::udp::server][INFO] Sending 43 bytes ... 2023-12-22T12:32:53.017038257+00:00 [torrust_tracker::servers::udp::server][INFO] 43 bytes sent ``` To: ```s 2023-12-22T12:35:51.320114322+00:00 [UDP][INFO] "CONNECT TxID 1583189312" 2023-12-22T12:35:51.345003905+00:00 [UDP][INFO] "ANNOUNCE TxID 1583189313 IH 443c7602b4fde83d1154d6d9da48808418b181b6" 2023-12-22T12:35:51.320114322+00:00 [UDP][INFO] "SCRAPE TxID 1583189312" ```` - The target is more generic "UDP" and it will be always the same even if we rearrange the packages. - The info is more useful. It includes the request type, the transaction ID to identify the client, and the info-hash. That would allow us to extract statistics from the logs. NOTE: In the long term maybe this should be configurable.
aaca370 to
6e607c3
Compare
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## develop #549 +/- ##
========================================
Coverage 79.57% 79.58%
========================================
Files 117 117
Lines 7747 7750 +3
========================================
+ Hits 6165 6168 +3
Misses 1582 1582 ☔ View full report in Codecov by Sentry. |
Member
Author
|
ACK ff3928e |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changed log lines format for the UDP tracker:
From:
To:
NOTE:
In the long term maybe this should be configurable.