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

Better-logging #140

Merged
merged 10 commits into from
Apr 6, 2024
Merged

Better-logging #140

merged 10 commits into from
Apr 6, 2024

Conversation

albertotirla
Copy link
Member

add more spans and make logging generally a lot more useful

Copy link

codecov bot commented Mar 12, 2024

Codecov Report

Attention: Patch coverage is 7.29167% with 89 lines in your changes are missing coverage. Please review.

Project coverage is 19.50%. Comparing base (b77a72d) to head (790447a).

Files Patch % Lines
cache/src/lib.rs 16.12% 26 Missing ⚠️
input/src/lib.rs 0.00% 17 Missing ⚠️
odilia/src/events/object.rs 6.25% 15 Missing ⚠️
odilia/src/state.rs 11.11% 8 Missing ⚠️
odilia/src/logging.rs 0.00% 7 Missing ⚠️
odilia/src/events/mod.rs 0.00% 6 Missing ⚠️
odilia/src/main.rs 0.00% 5 Missing ⚠️
odilia/src/events/cache.rs 0.00% 3 Missing ⚠️
odilia/src/events/document.rs 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #140      +/-   ##
==========================================
+ Coverage   16.64%   19.50%   +2.85%     
==========================================
  Files          22       23       +1     
  Lines        1646     1010     -636     
==========================================
- Hits          274      197      -77     
+ Misses       1372      813     -559     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@TTWNO TTWNO left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall, this is looking good. Glad to see a bit more detailed information in my trace logs, since I have a tendency to throw println! eveeywhere.

pub parent: CacheRef,
// The accessbile index in parent. i
/// The accessible index in parent.I
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The last character is a DBus XML type definition. don't capitalize it.

@@ -673,6 +688,7 @@ pub struct Cache {
impl Cache {
/// create a new, fresh cache
#[must_use]
#[tracing::instrument(level = "debug", ret)]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be trace

@@ -790,6 +815,7 @@ impl Cache {
/// 1. The `accessible` can not be turned into an `AccessiblePrimitive`. This should never happen, but is technically possible.
/// 2. The [`Self::add`] function fails.
/// 3. The [`accessible_to_cache_item`] function fails.
#[tracing::instrument(level = "debug", ret, err)]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

likewise, trace

@TTWNO TTWNO merged commit 8320631 into main Apr 6, 2024
10 of 11 checks passed
@albertotirla albertotirla deleted the better-logging branch September 7, 2024 19:49
@TTWNO TTWNO restored the better-logging branch November 8, 2024 21:53
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.

2 participants