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

feat: add device title to log messages #113

Merged
merged 2 commits into from
Mar 8, 2024
Merged

feat: add device title to log messages #113

merged 2 commits into from
Mar 8, 2024

Conversation

thecode
Copy link
Contributor

@thecode thecode commented Mar 8, 2024

I have a Shelly device with a buggy firmware which constantly log this message:

BTHome device is not sending object ids in numerical order (from low to high object id). This can cause issues with your BTHome receiver, payload: 008a016445c40005e02e002101

The message doesn't help identifying the device (although I know it is one of two devices) and in use case of multiple devices it would be hard to identify which device is logging the message and may be confusing when trying to analyze logs.

Added device title where it is possible and added/modified tests to cover the log messages

Copy link

codecov bot commented Mar 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 82.60%. Comparing base (113e49d) to head (6cc0f60).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #113      +/-   ##
==========================================
+ Coverage   81.28%   82.60%   +1.32%     
==========================================
  Files           6        6              
  Lines         529      529              
  Branches       82       82              
==========================================
+ Hits          430      437       +7     
+ Misses         78       73       -5     
+ Partials       21       19       -2     

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

@Ernst79
Copy link
Collaborator

Ernst79 commented Mar 8, 2024

I have one minor comment, I think we should have a colon after the name/title of the device. E.g.

ATC 18B2 New packet_id 9 indicates an older packet (previous packet_id 9).

should be

ATC 18B2: New packet_id 9 indicates an older packet (previous packet_id 9).

Sorry for this, but we can better do it correct now.

@thecode
Copy link
Contributor Author

thecode commented Mar 8, 2024

I have one minor comment, I think we should have a colon after the name/title of the device. E.g.
ATC 18B2: New packet_id 9 indicates an older packet (previous packet_id 9).

Good point, fixing

Copy link
Collaborator

@Ernst79 Ernst79 left a comment

Choose a reason for hiding this comment

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

Thanks!

@Ernst79 Ernst79 merged commit c47f36f into main Mar 8, 2024
8 checks passed
@Ernst79 Ernst79 deleted the log-name branch March 8, 2024 22:18
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