4 #include <log4cpp/Category.hh>
5 #include <log4cpp/OstreamAppender.hh>
6 #include <log4cpp/SimpleLayout.hh>
7 #include <log4cpp/Priority.hh>
12 #include "concordia/common/config.hpp"
45 void flush(log4cpp::Priority::Value priorityLevel);
103 void initialize_logger_();
104 void setDefaultLoggerAppender_();
105 void addDefaultLayoutToAppender_(log4cpp::Appender * appender);
106 void setNewLoggerAppender_(log4cpp::Appender * appender);
108 std::stringstream buffer;
109 log4cpp::Category & logger_category;
110 log4cpp::Appender * current_logger_appender;
117 concordia_logger << M; \
118 concordia_logger.flush(log4cpp::Priority::DEBUG); \
123 concordia_logger << M; \
124 concordia_logger.flush(log4cpp::Priority::DEBUG); \
127 #define DEBUG_NOFLUSH(M) \
129 concordia_logger << M; \
134 concordia_logger.flush(log4cpp::Priority::DEBUG); \
139 concordia_logger << M; \
140 concordia_logger.flush(log4cpp::Priority::INFO); \
145 concordia_logger << M; \
146 concordia_logger.flush(log4cpp::Priority::WARN); \
151 concordia_logger << M; \
152 concordia_logger.flush(log4cpp::Priority::ERROR); \
157 concordia_logger << M; \
158 concordia_logger.flush(log4cpp::Priority::FATAL); \
162 #define SET_LOGGER_FILE(M) do { concordia_logger.setLoggingToFile(M); \
164 #define SET_LOGGING_LEVEL(M) \
165 do { concordia_logger.setLoggingPriority(M); } while (0);
void setLoggingPriority(const std::string &priorityName)
Definition: logging.cpp:49
log4cpp::Priority::Value getLoggingPriority()
Definition: logging.cpp:59
ConcordiaLogger()
Definition: logging.cpp:8
void setLoggingToFile(const std::string &filepath)
Definition: logging.cpp:42
Definition: logging.hpp:17
void flush(log4cpp::Priority::Value priorityLevel)
Definition: logging.cpp:70
~ConcordiaLogger()
Definition: logging.cpp:39
ConcordiaLogger & operator<<(const std::string &msg)
Definition: logging.cpp:75