From ec18a75dcf69eb801e4a23aae8d48f83361ba802 Mon Sep 17 00:00:00 2001 From: Ziad Mostafa Date: Sat, 2 Nov 2024 09:54:51 +0100 Subject: [PATCH] [#396] Update setting log level section Signed-off-by: Ziad Mostafa --- FAQ.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/FAQ.md b/FAQ.md index 7743886e3..f53b42b98 100644 --- a/FAQ.md +++ b/FAQ.md @@ -134,6 +134,20 @@ But you can also use a crate like [ctrlc](https://docs.rs/ctrlc/latest/ctrlc/). ## How to set the log level +iceoryx2 gets the logging level from either the code, or the environment variable `IOX2_LOG_LEVEL` +the developer can set this environment variable with one of the supported levels: +```Trace, Debug, Info, Warning, Error, Fatal``` + +`export IOX2_LOG_LEVEL=Trace` + +or via `.cargo/config.toml` + +> [!NOTE] +> Setting IOX2_LOG_LEVEL from terminal will take precedence over setting it +> from `.cargo/config.toml`. + +Developers can also set the logging level from within the code: + ```rust use iceoryx2::prelude::*