-
Notifications
You must be signed in to change notification settings - Fork 17
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
Better-logging #140
Conversation
…similarly for main
…ng with the odilia-cache crate
most of it is only available at the trace level though, because they aren't informative enough when used in debug mode, compared to the noise they create
Codecov ReportAttention: Patch coverage is
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. |
There was a problem hiding this 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 |
There was a problem hiding this comment.
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)] |
There was a problem hiding this comment.
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)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
likewise, trace
add more spans and make logging generally a lot more useful