38#include "blocxx/BLOCXX_config.h"
331 return m_appender->categoryIsEnabled(category);
345 return m_appender->componentAndCategoryAreEnabled(component, category);
#define BLOCXX_ASSERT(CON)
BLOCXX_ASSERT works similar to the assert() macro, but instead of calling abort(),...
#define BLOCXX_DEFINE_EXCEPTION_WITH_ID(NAME)
Define a new exception class named <NAME>Exception that derives from Exception.
#define BLOCXX_GLOBAL_STRING_INIT(str)
void logDebug2(const String &message, const char *filename=0, int fileline=-1, const char *methodname=0) const
If getLogLevel() >= E_DEBUG2_LEVEL, Log debug info.
static const GlobalString STR_DEBUG2_CATEGORY
static const GlobalString STR_WARNING_CATEGORY
static const GlobalString STR_DEBUG3_CATEGORY
Logger(const String &defaultComponent=STR_DEFAULT_COMPONENT, const LogAppenderRef &appender=LogAppenderRef())
bool categoryIsEnabled(const String &category) const
Determine if the log category is enabled.
void logFatalError(const String &message, const char *filename=0, int fileline=-1, const char *methodname=0) const
Log message with a fatal error category and the default component.
String m_defaultComponent
static const GlobalString STR_DEBUG_CATEGORY
bool levelIsEnabled(const ELogLevel level) const
Check if the logger is enabled for given level.
bool componentAndCategoryAreEnabled(const String &component, const String &category) const
Determine if the component and category are both enabled.
void setLogLevel(ELogLevel logLevel)
Set the log level.
static String logLevelToString(ELogLevel logLevel)
Convert a log level enum to a string.
static const GlobalString STR_ALL_CATEGORY
virtual LoggerRef clone() const BLOCXX_DEPRECATED
LogAppenderRef m_appender
static const GlobalString STR_FATAL_CATEGORY
void logDebug(const String &message, const char *filename=0, int fileline=-1, const char *methodname=0) const
If getLogLevel() >= E_DEBUG_LEVEL, Log debug info.
void setDefaultComponent(const String &component)
Sets the default component.
static const GlobalString STR_ERROR_CATEGORY
static ELogLevel stringToLogLevel(const String &logLevel)
Convert a log level string to an enum value.
void processLogMessage(const LogMessage &message) const
ELogLevel getLogLevel() const
Logger & operator=(const Logger &)
static const GlobalString STR_DEFAULT_COMPONENT
void logDebug3(const String &message, const char *filename=0, int fileline=-1, const char *methodname=0) const
If getLogLevel() >= E_DEBUG3_LEVEL, Log debug info.
void logInfo(const String &message, const char *filename=0, int fileline=-1, const char *methodname=0) const
If getLogLevel() >= E_INFO_LEVEL, Log info.
String getDefaultComponent() const
Gets the default component.
void logError(const String &message, const char *filename=0, int fileline=-1, const char *methodname=0) const
If getLogLevel() >= E_ERROR_LEVEL, Log message with an error category and the default component.
static const GlobalString STR_INFO_CATEGORY
void logMessage(const String &component, const String &category, const String &message) const
Log a message using the specified component and category The current log level is ignored.
static const GlobalString STR_NONE_CATEGORY
void logWarning(const String &message, const char *filename=0, int fileline=-1, const char *methodname=0) const
If getLogLevel() >= E_WARNING_LEVEL, Log info.
This String class is an abstract data type that represents as NULL terminated string of characters.
bool equalsIgnoreCase(const String &arg) const
Determine if another String object is equal to this String object, ignoring case in the comparision.
IntrusiveReference< Logger > LoggerRef
LazyGlobal< String, char const *const > GlobalString
class BLOCXX_COMMON_API Logger
IntrusiveReference< LogAppender > LogAppenderRef