Open elfenpiff opened 1 month ago
@elfenpiff I just remember that I introduced a log_level_from_env_or(LogLevel)
function in iceoryx1.
We could also do this for iceoryx2 and just set an IOX2_LOG_LEVEL=trace
environment variable in out bashrc. With this, we would still have the detailed log by default and the examples would have a less noisy by default.
It would also require less code to be added to the examples
(Code) Example Of Cumbersome API
Sometimes, a bug occurs in an example, or the example is the starting point of a user project, and then something goes wrong. It would be helpful if the user could easily increase the log level by adding a command-line option.
This should be implemented as efficiently as possible (from a lines of code view). This means that the argument parsing should only be one or two lines of additional code in the examples. The logic shall be stored in an external library that does all the logic. This logic shall be available for all examples in all languages.