Skip to content

[#711] Do not set default log level trace in cargo #712

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

Merged
merged 2 commits into from
Apr 30, 2025
Merged
Show file tree
Hide file tree
Changes from all 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
1 change: 0 additions & 1 deletion .cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ rustdocflags = ["-D", "warnings"]
[env]
RUST_TEST_THREADS = "1"
RUST_BACKTRACE = "1"
IOX2_LOG_LEVEL = "Trace"

[target.debug]
rustflags = ["-Z", "sanitizer=address"]
Expand Down
23 changes: 23 additions & 0 deletions FAQ_ICEORYX_DEVS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,28 @@
# Frequently Asked Questions - iceoryx Developer Edition

## Set `LogLevel::Trace` as default

During development, a detailed log output is often required. Therefore, the log
level should default to `LogLevel::Trace`. All iceoryx2 examples use the call
`set_log_level_from_env_or(LogLevel::Info)` to allow overriding the default.

Users can override the log level in the following ways:

1. **Environment variable**
Set the variable in the terminal:
```bash
export IOX2_LOG_LEVEL="Trace"
```

2. **Cargo environment configuration**
Define `IOX2_LOG_LEVEL` in `$GITROOT$/.cargo/config.toml` or globally in
`~/.cargo/config.toml` by adding:

```toml
[env]
IOX2_LOG_LEVEL = "Trace"
```

## Tests marked with `#[should_panic]` attribute do not panic in release builds

This usually happens when the panic is triggert via a `debug_assert` macro.
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 @@ -75,6 +75,8 @@
[#695](https://github.com/eclipse-iceoryx/iceoryx2/issues/695)
* Fix Miri issues with MetaVec due to temporary borrow
[#682](https://github.com/eclipse-iceoryx/iceoryx2/issues/682)
* Do not set default log level for cargo
[#711](https://github.com/eclipse-iceoryx/iceoryx2/issues/711)

### Refactoring

Expand Down