eclipse-iceoryx / iceoryx2

Eclipse iceoryx2™ - true zero-copy inter-process-communication in pure Rust
https://iceoryx.io
Apache License 2.0
1.03k stars 40 forks source link

[#396] Read and set LogLevel from environment variable #474

Open zmostafa opened 1 month ago

zmostafa commented 1 month ago

Notes for Reviewer

Adds functionality to set the log level from the environment.

I went for @elBoberido proposal solution, where I read an environment variable called IOX2_LOG_LEVEL and set the LogLevel, with its value at runtime.

Pre-Review Checklist for the PR Author

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

Checklist for the PR Reviewer

Post-review Checklist for the PR Author

  1. [x] All open points are addressed and tracked via issues

References

Closes #396

xieyuschen commented 1 month ago

Moreover, please follow the convention here:

elfenpiff commented 1 month ago

@zmostafa hey hey ... you are back. I am happy to see your PR plopping up here.

zmostafa commented 1 month ago

@elfenpiff you have to thank Jeff for the motivation, and thanks for the nice words as expected from you.

You guys are the best :heart:

codecov[bot] commented 2 weeks ago

Codecov Report

Attention: Patch coverage is 64.00000% with 9 lines in your changes missing coverage. Please review.

Project coverage is 79.64%. Comparing base (810fb87) to head (e2b323c). Report is 9 commits behind head on main.

Files with missing lines Patch % Lines
iceoryx2-bb/log/src/lib.rs 64.00% 9 Missing :warning:
Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/eclipse-iceoryx/iceoryx2/pull/474/graphs/tree.svg?width=650&height=150&src=pr&token=FN3YFXTJCI&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=eclipse-iceoryx)](https://app.codecov.io/gh/eclipse-iceoryx/iceoryx2/pull/474?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=eclipse-iceoryx) ```diff @@ Coverage Diff @@ ## main #474 +/- ## ========================================== + Coverage 79.22% 79.64% +0.42% ========================================== Files 200 200 Lines 23765 23779 +14 ========================================== + Hits 18828 18939 +111 + Misses 4937 4840 -97 ``` | [Files with missing lines](https://app.codecov.io/gh/eclipse-iceoryx/iceoryx2/pull/474?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=eclipse-iceoryx) | Coverage Δ | | |---|---|---| | [iceoryx2-bb/log/src/lib.rs](https://app.codecov.io/gh/eclipse-iceoryx/iceoryx2/pull/474?src=pr&el=tree&filepath=iceoryx2-bb%2Flog%2Fsrc%2Flib.rs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=eclipse-iceoryx#diff-aWNlb3J5eDItYmIvbG9nL3NyYy9saWIucnM=) | `73.77% <64.00%> (-3.16%)` | :arrow_down: | ... and [21 files with indirect coverage changes](https://app.codecov.io/gh/eclipse-iceoryx/iceoryx2/pull/474/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=eclipse-iceoryx)