Solar
Macros
Add_sinks
Collaboration diagram for Add_sinks:

Macros

#define LOG_ADD_LOG_TO_FILE(...)
 LOG_ADD_LOG_TO_FILE : redirects logs to the specified file. More...
 
#define LOG_ADD_LOG_TO_CONSOLE()
 LOG_ADD_LOG_TO_CONSOLE : redirects logs to the console. More...
 

Detailed Description

these macros should be used to define console and/or file output streams

Macro Definition Documentation

◆ LOG_ADD_LOG_TO_CONSOLE

#define LOG_ADD_LOG_TO_CONSOLE ( )
Value:
{ \
Log::add_sink_console();\
}

LOG_ADD_LOG_TO_CONSOLE : redirects logs to the console.

◆ LOG_ADD_LOG_TO_FILE

#define LOG_ADD_LOG_TO_FILE (   ...)
Value:
{ \
std::vector<const char*> args = { __VA_ARGS__ }; \
Log::add_sink_file(args);\
}

LOG_ADD_LOG_TO_FILE : redirects logs to the specified file.

options are :
-LOG_ADD_LOG_TO_FILE(file) : the logs are appended if the file already exists
-LOG_ADD_LOG_TO_FILE(file,"r") : the file is rewinded if it already exists