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

[#392] noisy logger #393

Merged
merged 3 commits into from
Sep 25, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,17 @@ assignees: ''

---

Before posting the bug, take a look at the
[FAQ](https://github.com/eclipse-iceoryx/iceoryx2/blob/main/FAQ.md)
for a possible solution.

## Required information

**Operating system:**
* OS name, version
* Additionally, on Linux, Mac Os, Unix, output of: `uname -a`
* Additionally, on Windows, output of: `ver`

* OS name, version
* Additionally, on Linux, Mac Os, Unix, output of: `uname -a`
* Additionally, on Windows, output of: `ver`

**Rust version:**
Output of: `rustc --version`
Expand All @@ -23,6 +28,10 @@ Output of: `cargo --version`
**iceoryx2 version:**
E.g. `v1.2.3` or `main` branch

**Detailed log output:**
Add the call `set_log_level(LogLevel::Trace)` at the beginning of your application
and attach the detailed log-output to the bug ticket.

**Observed result or behaviour:**
A minimalistic running code example that reproduces the bug or
a clear and precise description of the observed result.
Expand Down
10 changes: 10 additions & 0 deletions FAQ.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,16 @@ But you can also use a crate like [ctrlc](https://docs.rs/ctrlc/latest/ctrlc/).
iceoryx2 = { version = "0.1.0", features = ["logger_tracing"]}
```

## How to set the log level

```rust
use iceoryx2::prelude::*

// ...

set_log_level(LogLevel::Trace);
```

## A crash leads to the failure `PublishSubscribeOpenError(UnableToOpenDynamicServiceInformation)`

**Note:** A command line tool and internal service is already planned to cleanup
Expand Down
2 changes: 2 additions & 0 deletions doc/release-notes/iceoryx2-unreleased.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,8 @@

* Extended CLI parameters for benchmarks
[#360](https://github.com/eclipse-iceoryx/iceoryx2/issues/360)
* Default log-level is set from `LogLevel::Trace` to `LogLevel::Warn`
[#392](https://github.com/eclipse-iceoryx/iceoryx2/issues/392)

### New API features

Expand Down
2 changes: 1 addition & 1 deletion iceoryx2-bb/log/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ static DEFAULT_LOGGER: logger::log::Logger = logger::log::Logger::new();
#[cfg(not(any(feature = "logger_log", feature = "logger_tracing")))]
static DEFAULT_LOGGER: logger::console::Logger = logger::console::Logger::new();

const DEFAULT_LOG_LEVEL: u8 = LogLevel::Trace as u8;
const DEFAULT_LOG_LEVEL: u8 = LogLevel::Warn as u8;
elBoberido marked this conversation as resolved.
Show resolved Hide resolved

static mut LOGGER: Option<&'static dyn logger::Logger> = None;
static LOG_LEVEL: IoxAtomicU8 = IoxAtomicU8::new(DEFAULT_LOG_LEVEL);
Expand Down
2 changes: 2 additions & 0 deletions iceoryx2/src/prelude.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,5 @@ pub use iceoryx2_bb_derive_macros::PlacementDefault;
pub use iceoryx2_bb_elementary::alignment::Alignment;
pub use iceoryx2_bb_elementary::placement_default::PlacementDefault;
pub use iceoryx2_bb_elementary::CallbackProgression;
pub use iceoryx2_bb_log::set_log_level;
pub use iceoryx2_bb_log::LogLevel;
Loading