Closed simatic closed 2 months ago
Use of Apache Log4cxx must follow the following guidelines:
res/fbae_logger.properties
can contain instructions about what to trace during fbae execution.{fmt}
style should #include <format>
std::format
, when we have to display variables of type rank_t
or MsgId_t
which are actually unint8_t
, we do not need anymore to static_cast<unint32_t>(var)
as we can specifiy the output format, e.g. LOG4CXX_ERROR_FMT(m_logger, "Error message with unint8_t displayed as int : {:d}", var_of_type_unit8_t);
CMakeLists.txt
must integrate the following lines
# We want to use Log4cxx format trace capabilities ==> We must set
# "LOG4CXX_FORMAT_NS" compilation flag to "std" value
if (MSVC)
add_compile_options(/DLOG4CXX_FORMAT_NS=std)
else()
add_compile_options(-DLOG4CXX_FORMAT_NS=std)
endif()
FBAE provides a
-v
(for "verbose) runtime argument which usescout
to display debugging information. This solution is quite limited as:-v
argument (for instance, to decide to diplay only information related to SessionLayer).So FBAE must provide a true logging environment like Apache Log4cxx.