YAP
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
logging.h
Go to the documentation of this file.
1 #ifndef yap_logging_h
2 #define yap_logging_h
3 
5 
6 #include "easylogging++.h"
7 
8 namespace yap {
9 
36 #define Max_Log_File_Size 1000
37 
40 inline void disableLogs(el::Level lvl)
41 {
42  el::Configurations defaultConf;
43  defaultConf.setToDefault();
44  defaultConf.set(lvl, el::ConfigurationType::Enabled, "0");
45  el::Loggers::reconfigureLogger("default", defaultConf);
46 }
47 
50 inline void plainLogs(el::Level lvl)
51 {
52  el::Configurations defaultConf;
53  defaultConf.setToDefault();
54  defaultConf.set(lvl, el::ConfigurationType::Format, "%msg");
55  el::Loggers::reconfigureLogger("default", defaultConf);
56 }
57 
60 #ifdef ELPP_DISABLE_DEBUG_LOGS
61 #define DEBUG(x)
62 #else
63 #define DEBUG(x) LOG(DEBUG) << x;
64 #endif
65 
69 #ifdef ELPP_DISABLE_DEBUG_LOGS
70 #define FDEBUG(x)
71 #else
72 #define FDEBUG(x) LOG(DEBUG) << std::string(ELPP_FUNC) + ": " << x;
73 #endif
74 
77 #define FLOG(x) LOG( x ) << std::string(ELPP_FUNC) + ": "
78 
79 }
80 
81 #endif
void plainLogs(el::Level lvl)
Definition: logging.h:50
void disableLogs(el::Level lvl)
Definition: logging.h:40