26 #ifndef ELEMENTSKERNEL_ELEMENTSKERNEL_LOGGING_H_
27 #define ELEMENTSKERNEL_ELEMENTSKERNEL_LOGGING_H_
33 #include <log4cpp/Category.hh>
139 static void setLogFile(
const Path::Item& fileName);
146 m_log4cppLogger.debug(logMessage);
154 template<
typename ...Args>
155 void debug(
const char *stringFormat, Args &&...args) {
156 m_log4cppLogger.debug(stringFormat, std::forward<Args>(args)...);
173 m_log4cppLogger.info(logMessage);
181 template<
typename ...Args>
182 void info(
const char *stringFormat, Args &&...args) {
183 m_log4cppLogger.info(stringFormat, std::forward<Args>(args)...);
200 m_log4cppLogger.warn(logMessage);
208 template<
typename ...Args>
209 void warn(
const char *stringFormat, Args &&...args) {
210 m_log4cppLogger.warn(stringFormat, std::forward<Args>(args)...);
227 m_log4cppLogger.error(logMessage);
235 template<
typename ...Args>
236 void error(
const char *stringFormat, Args &&...args) {
237 m_log4cppLogger.error(stringFormat, std::forward<Args>(args)...);
254 m_log4cppLogger.fatal(logMessage);
262 template<
typename ...Args>
263 void fatal(
const char *stringFormat, Args &&...args) {
264 m_log4cppLogger.fatal(stringFormat, std::forward<Args>(args)...);
283 m_log4cppLogger.log(level, logMessage);
292 template<
typename ...Args>
293 void log(log4cpp::Priority::Value level,
const char *stringFormat, Args &&...args) {
294 m_log4cppLogger.log(level, stringFormat, std::forward<Args>(args)...);
299 explicit Logging(log4cpp::Category& log4cppLogger);
323 template <
typename T>
defines the macros to be used for explicit export of the symbols
provide functions to retrieve resources pointed by environment variables
A helper class for logging messages using the "<<" operator.
LogMessageStream(log4cpp::Category &logger, P_log_func log_func)
void(log4cpp::Category::*)(const std::string &) P_log_func
log4cpp::Category & m_logger
LogMessageStream & operator<<(const T &m)
Logging API of the Elements framework.
void error(const std::string &logMessage)
void debug(const std::string &logMessage)
void warn(const std::string &logMessage)
void error(const char *stringFormat, Args &&...args)
log4cpp::Category & m_log4cppLogger
void log(log4cpp::Priority::Value level, const std::string &logMessage)
void warn(const char *stringFormat, Args &&...args)
void fatal(const char *stringFormat, Args &&...args)
void fatal(const std::string &logMessage)
void info(const std::string &logMessage)
void info(const char *stringFormat, Args &&...args)
void log(log4cpp::Priority::Value level, const char *stringFormat, Args &&...args)
void debug(const char *stringFormat, Args &&...args)
#define ELEMENTS_API
Dummy definitions for the backward compatibility mode.
boost::filesystem::path Item