You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Right now the Logger class only logs into specific Fledge output files and not into the standard output, meaning they will not appear when running unit tests.
Having a compile time flag to make all Fledge logs appear in stdout while running unit tests would be quite useful in plugin debugging phase.
Describe the solution you'd like
A solution would be to provide log function wrappers that would call both the Logger and the printf() function when a compile time flag is on so that the log is visible in both places.
Example of wrapper function for one log level:
LogUtils::log_debug("Logging some debug data: %s", data.c_str());
Describe alternatives you've considered
A more advanced approach would be to further upgrade the Logger class into handling multiple types of appenders so that the user could define its own appenders when configuring Fledge (see examples of implementation in https://log4cpp.sourceforge.net/).
This was not retained so far as it would have more impact on existing code and may result in interface evolutions.
Additional context
N/A
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
Right now the Logger class only logs into specific Fledge output files and not into the standard output, meaning they will not appear when running unit tests.
Having a compile time flag to make all Fledge logs appear in stdout while running unit tests would be quite useful in plugin debugging phase.
Describe the solution you'd like
A solution would be to provide log function wrappers that would call both the Logger and the printf() function when a compile time flag is on so that the log is visible in both places.
Example of wrapper function for one log level:
Example of precompiler definition to add to the tests CMakeLists:
Example of usage:
LogUtils::log_debug("Logging some debug data: %s", data.c_str());
Describe alternatives you've considered
A more advanced approach would be to further upgrade the Logger class into handling multiple types of appenders so that the user could define its own appenders when configuring Fledge (see examples of implementation in https://log4cpp.sourceforge.net/).
This was not retained so far as it would have more impact on existing code and may result in interface evolutions.
Additional context
N/A
The text was updated successfully, but these errors were encountered: