27 mListeners.push_back(_lestener);
32 for (VectorLogListeners::iterator listener = mListeners.begin(); listener != mListeners.end(); ++listener)
38 for (VectorLogListeners::iterator listener = mListeners.begin(); listener != mListeners.end(); ++listener)
44 for (VectorLogListeners::iterator listener = mListeners.begin(); listener != mListeners.end(); ++listener)
48 void LogSource::log(
const std::string& _section,
LogLevel _level,
const struct tm* _time,
const std::string& _message,
const char* _file,
int _line)
50 if (mFilter !=
nullptr)
52 if (!mFilter->
shouldLog(_section, _level, _time, _message, _file, _line))
56 for (VectorLogListeners::iterator listener = mListeners.begin(); listener != mListeners.end(); ++listener)
57 (*listener)->log(_section, _level, _time, _message, _file, _line);
virtual bool shouldLog(const std::string &_section, LogLevel _level, const struct tm *_time, const std::string &_message, const char *_file, int _line)
void setLogFilter(ILogFilter *_filter)
void log(const std::string &_section, LogLevel _level, const struct tm *_time, const std::string &_message, const char *_file, int _line)
void addLogListener(ILogListener *_lestener)