44 #ifndef INCLUDE_OLA_LOGGING_H_
45 #define INCLUDE_OLA_LOGGING_H_
57 #define OLA_LOG(level) (level <= ola::LogLevel()) && \
58 ola::LogLine(__FILE__, __LINE__, level).stream()
65 #define OLA_FATAL OLA_LOG(ola::OLA_LOG_FATAL)
73 #define OLA_WARN OLA_LOG(ola::OLA_LOG_WARN)
81 #define OLA_INFO OLA_LOG(ola::OLA_LOG_INFO)
89 #define OLA_DEBUG OLA_LOG(ola::OLA_LOG_DEBUG)
138 virtual void Write(
log_level level,
const std::string &log_line) = 0;
171 typedef void* WindowsLogHandle;
172 WindowsLogHandle m_eventlog;
184 LogLine(
const char *file,
int line,
log_level level);
188 std::ostream &stream() {
return m_stream; }
191 std::ostringstream m_stream;
192 unsigned int m_prefix_length;
243 #endif // INCLUDE_OLA_LOGGING_H_