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

[#4] Introduce developer guide with log documentation #469

Merged
merged 1 commit into from
Oct 15, 2024

Conversation

elfenpiff
Copy link
Contributor

@elfenpiff elfenpiff commented Oct 15, 2024

Notes for Reviewer

A detailed documentation about logging (and also how to handle errors since they are tightly coupled to logging) in iceoryx2.

Pre-Review Checklist for the PR Author

  1. Add sensible notes for the reviewer
  2. PR title is short, expressive and meaningful
  3. Relevant issues are linked in the References section
  4. Every source code file has a copyright header with SPDX-License-Identifier: Apache-2.0 OR MIT
  5. Branch follows the naming format (iox2-123-introduce-posix-ipc-example)
  6. Commits messages are according to this guideline
  7. Tests follow the best practice for testing
  8. Changelog updated in the unreleased section including API breaking changes
  9. Assign PR to reviewer
  10. All checks have passed (except task-list-completed)

Checklist for the PR Reviewer

  • Commits are properly organized and messages are according to the guideline
  • Unit tests have been written for new behavior
  • Public API is documented
  • PR title describes the changes

Post-review Checklist for the PR Author

  1. All open points are addressed and tracked via issues

References

Relates to #4

@elfenpiff elfenpiff self-assigned this Oct 15, 2024
Copy link

codecov bot commented Oct 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.95%. Comparing base (e5b44a9) to head (3f4dd87).
Report is 7 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #469      +/-   ##
==========================================
- Coverage   79.08%   78.95%   -0.13%     
==========================================
  Files         196      197       +1     
  Lines       23572    23637      +65     
==========================================
+ Hits        18641    18663      +22     
- Misses       4931     4974      +43     

see 5 files with indirect coverage changes

Copy link
Contributor

@orecham orecham left a comment

Choose a reason for hiding this comment

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

LGTM

Comment on lines +36 to +40
0 [T] FileBuilder { file_path: FilePath { value: FixedSizeByteString<255> { |
len: 20, data: "config/iceoryx2.toml" } }, access_mode: Read, |
permission: Permission(448), has_ownership: false, owner: None, |
group: None, truncate_size: None, creation_mode: None } |
| opened ---------------------------------------------------------------+
Copy link
Member

Choose a reason for hiding this comment

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

Not in this PR but would it be possible to have the actual log message before the origin?

I volunteer to change this, if you agree

Copy link
Contributor Author

@elfenpiff elfenpiff Oct 15, 2024

Choose a reason for hiding this comment

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

Why? For me it feels wrong but if @orecham also prefers to switch the output order of the console logger I would go with the flow.

Copy link
Member

Choose a reason for hiding this comment

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

Because it feels like yoda notation 😅

At first it's the log level, e.g. [W]. Then it's the context, but for what? Finally, it's the actual log message and the context becomes meaningful but one has to scroll back to the top.

I would even change the format to this in order to have a clean separation between log message and context

0 [T] opened
      === Context ===
      FileBuilder { file_path: FilePath { value: FixedSizeByteString<255> {   |
      len: 20, data: "config/iceoryx2.toml" } }, access_mode: Read,           |
      permission: Permission(448), has_ownership: false, owner: None,         |
      group: None, truncate_size: None, creation_mode: None } 

Instead of ### Context ### something like ======== would also work.

@elfenpiff elfenpiff merged commit cd27eee into eclipse-iceoryx:main Oct 15, 2024
53 of 54 checks passed
@elfenpiff elfenpiff deleted the iox2-4-log-documentation branch October 15, 2024 22:59
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.

3 participants