18 #ifndef __H__OCULAR_LOGGER__H__
19 #define __H__OCULAR_LOGGER__H__
21 #include "ILoggerListener.hpp"
22 #include "Exceptions/Exception.hpp"
72 template<
typename T,
typename... U>
77 m_CurrentMessage.channel = LoggerChannels::Debug;
78 m_IncompleteMessage.str(std::string());
79 m_IncompleteMessage << first;
92 template<
typename T,
typename... U>
93 void info(T first, U... args)
97 m_CurrentMessage.channel = LoggerChannels::Info;
98 m_IncompleteMessage.str(std::string());
99 m_IncompleteMessage << first;
113 template<
typename T,
typename... U>
118 m_CurrentMessage.channel = LoggerChannels::Warning;
119 m_IncompleteMessage.str(std::string());
120 m_IncompleteMessage << first;
133 template<
typename T,
typename... U>
138 m_CurrentMessage.channel = LoggerChannels::Error;
139 m_IncompleteMessage.str(std::string());
140 m_IncompleteMessage << first;
160 template<
typename T,
typename... U>
165 m_CurrentMessage.channel = LoggerChannels::Fatal;
166 m_IncompleteMessage.str(std::string());
167 m_IncompleteMessage << first;
180 template<
typename T,
typename... U>
181 void log(T first, U... last)
183 m_IncompleteMessage << first;
194 std::stringstream m_IncompleteMessage;
195 LoggerMessage m_CurrentMessage;
197 std::list<std::unique_ptr<ILoggerListener>> m_Listeners;
void fatal(T first, U...args)
Definition: Logger.hpp:161
void info(T first, U...args)
Definition: Logger.hpp:93
Note: Once this library is made dynamic, this will no longer be needed.
Definition: Common.hpp:70
void registerListener(ILoggerListener *listener)
Definition: Logger.cpp:42
void debug(T first, U...args)
Definition: Logger.hpp:73
void error(T first, U...args)
Definition: Logger.hpp:134
Definition: ILoggerListener.hpp:42
void warning(T first, U...args)
Definition: Logger.hpp:114
Definition: Logger.hpp:47
Definition: Exception.hpp:42