18#ifndef _LOG4CXX_HELPERS_LOG_LOG_H
19#define _LOG4CXX_HELPERS_LOG_LOG_H
42class LOG4CXX_EXPORT LogLog
45 LOG4CXX_DECLARE_PRIVATE_MEMBER_PTR(LogLogPrivate, m_priv)
49 LogLog(
const LogLog&);
50 LogLog& operator=(
const LogLog&);
51 static LogLog& getInstance();
110#if !LOG4CXX_LOGCHAR_IS_UTF8
137 static void emit_log(
const LogString& prefix,
const std::exception& ex,
const LogString& suffix);
142#if defined(LOGLOG_THRESHOLD) && LOGLOG_THRESHOLD <= 10000
159#define LOGLOG_DEBUG(logger, message) { \
160 if (LOG4CXX_NS::helpers::LogLog::isDebugEnabledFor(logger)) { \
161 LOG4CXX_NS::helpers::MessageBuffer buf; \
162 LOG4CXX_NS::helpers::LogLog::trace(logger, buf.str(buf << message)); } }
164#define LOGLOG_DEBUG(logger, message)
167#if defined(LOGLOG_THRESHOLD) && LOGLOG_THRESHOLD <= 5000
183#define LOGLOG_TRACE(logger, message) { \
184 if (LOG4CXX_NS::helpers::LogLog::isTraceEnabledFor(logger)) { \
185 LOG4CXX_NS::helpers::MessageBuffer buf; \
186 LOG4CXX_NS::helpers::LogLog::trace(logger, buf.str(buf << message)); } }
188#define LOGLOG_TRACE(logger, message)
195#define LOGLOG_WARN(message) { \
196 LOG4CXX_NS::helpers::MessageBuffer buf; \
197 LOG4CXX_NS::helpers::LogLog::warn(buf.str(buf << message)); }
203#define LOGLOG_ERROR(message) { \
204 LOG4CXX_NS::helpers::MessageBuffer buf; \
205 LOG4CXX_NS::helpers::LogLog::error(buf.str(buf << message)); }
static void error(const LogString &msg)
Output msg to SystemErrWriter unconditionally.
static void setInternalDebugging(bool newValue)
Start/stop outputing debug messages if newValue is true/false respectively.
static void debug(const LogString &msg, const std::exception &e)
Output msg and ex.what() to SystemErrWriter if internal debug logging is enabled.
static void error(const LogString &msg, const std::exception &ex)
Output msg and ex.what() to SystemErrWriter unconditionally.
static void setColorEnabled(bool newValue)
Start/stop coloring message text if newValue is true/false respectively.
static bool isTraceEnabledFor(const LoggerPtr &category)
Are category trace messages sent to SystemErrWriter?
static void warn(const LogString &msg, const std::exception &ex)
Output msg and ex.what() to SystemErrWriter unconditionally.
static void trace(const LoggerPtr &category, const std::string &msg)
Output msg to SystemErrWriter if internal debug logging is enabled.
static bool isDebugEnabled()
Are debug messages sent to SystemErrWriter?
static void trace(const LoggerPtr &category, const LogString &msg)
Output msg to SystemErrWriter if internal debug logging is enabled.
static void warn(const LogString &msg)
Output msg to SystemErrWriter unconditionally.
static bool isDebugEnabledFor(const LoggerPtr &category)
Are category debug messages sent to SystemErrWriter?
static void debug(const LogString &msg)
Output msg to SystemErrWriter if internal debug logging is enabled.
static bool isColorEnabled()
Are messages output in color?
static void setQuietMode(bool newValue)
Change quiet mode to newValue.
The WideLife wrapper is destined to prolongate the runtime logger state lifetime from static duration...
Definition widelife.h:37
std::basic_string< logchar > LogString
Definition logstring.h:60
std::shared_ptr< Logger > LoggerPtr
Definition defaultloggerfactory.h:27