make logging configurable during compilation and runtime
Compile-time: * A new meson option 'log_level' is introduced which has all the values from the Loglevel enum * The 'OFF' option defines EMPER_LOG_OFF which causes the LOG* macros to be empty and the Logger<>::log function to return immediately * The default 'automatic' option sets 'log_level' to 'Error' for release builds and to 'ALL' otherwise Runtime: * The global variable emper::log_level defined in Debug.hpp controls the logging output * It is initialized with the meson option 'log_level' but can be changed during runtime
Showing
- emper/ContextManager.cpp 1 addition, 1 deletionemper/ContextManager.cpp
- emper/Debug.cpp 6 additions, 0 deletionsemper/Debug.cpp
- emper/Debug.hpp 14 additions, 5 deletionsemper/Debug.hpp
- emper/Runtime.cpp 1 addition, 1 deletionemper/Runtime.cpp
- emper/Semaphore.cpp 1 addition, 1 deletionemper/Semaphore.cpp
- meson.build 10 additions, 0 deletionsmeson.build
- meson_options.txt 6 additions, 0 deletionsmeson_options.txt
Loading
Please register or sign in to comment