|
blocxx
|
This class sends log messges to syslog. More...
#include <SyslogAppender.hpp>
Public Member Functions | |
| SyslogAppender (const StringArray &components, const StringArray &categories, const String &pattern, const String &identity, const String &facility) | |
| virtual | ~SyslogAppender () |
Public Member Functions inherited from BLOCXX_NAMESPACE::LogAppender | |
| virtual | ~LogAppender () |
| void | logMessage (const LogMessage &message) const |
| Log a message using the specified component and category. | |
| bool | categoryIsEnabled (const String &category) const |
| bool | componentAndCategoryAreEnabled (const String &component, const String &category) const |
| ELogLevel | getLogLevel () const |
Static Public Attributes | |
| static const GlobalString | STR_DEFAULT_MESSAGE_PATTERN = { "[%t]%m" , 0, {0, PTHREAD_MUTEX_INITIALIZER} } |
Static Public Attributes inherited from BLOCXX_NAMESPACE::LogAppender | |
| static const GlobalStringArray | ALL_COMPONENTS = { "*" , 0, {0, PTHREAD_MUTEX_INITIALIZER} } |
| Pass to createLogAppender to indicate all components. | |
| static const GlobalStringArray | ALL_CATEGORIES = { "*" , 0, {0, PTHREAD_MUTEX_INITIALIZER} } |
| Pass to createLogAppender to indicate all categories. | |
| static const GlobalString | STR_TTCC_MESSAGE_FORMAT = { "%r [%t] %-5p %c - %m" , 0, {0, PTHREAD_MUTEX_INITIALIZER} } |
| The Log4j TTCC message format - TTCC is acronym for Time Thread Category Component. | |
| static const GlobalString | TYPE_SYSLOG = { "syslog" , 0, {0, PTHREAD_MUTEX_INITIALIZER} } |
| String of the type of the syslog log appender. | |
| static const GlobalString | TYPE_STDERR = { "stderr" , 0, {0, PTHREAD_MUTEX_INITIALIZER} } |
| String of the type of the stderr log appender. | |
| static const GlobalString | TYPE_FILE = { "file" , 0, {0, PTHREAD_MUTEX_INITIALIZER} } |
| String of the type of the file log appender. | |
| static const GlobalString | TYPE_MPFILE = { "mpfile" , 0, {0, PTHREAD_MUTEX_INITIALIZER} } |
| String of the type of the multi-process file log appender. | |
| static const GlobalString | TYPE_NULL = { "null" , 0, {0, PTHREAD_MUTEX_INITIALIZER} } |
| String of the type of the null log appender. | |
Protected Member Functions | |
| virtual void | doProcessLogMessage (const String &formattedMessage, const LogMessage &message) const |
Protected Member Functions inherited from BLOCXX_NAMESPACE::LogAppender | |
| LogAppender (const StringArray &components=ALL_COMPONENTS, const StringArray &categories=ALL_CATEGORIES, const String &pattern=STR_TTCC_MESSAGE_FORMAT) | |
Protected Member Functions inherited from BLOCXX_NAMESPACE::IntrusiveCountableBase | |
| IntrusiveCountableBase () | |
| IntrusiveCountableBase (const IntrusiveCountableBase &) | |
| IntrusiveCountableBase & | operator= (const IntrusiveCountableBase &) |
| virtual | ~IntrusiveCountableBase () |
Static Protected Attributes | |
| static bool | calledOpenLog = false |
Additional Inherited Members | |
Static Public Member Functions inherited from BLOCXX_NAMESPACE::LogAppender | |
| static LogAppenderRef | getCurrentLogAppender () |
| Get a copy of the per thread LogAppenderRef or if not set, the default one. | |
| static LogAppenderRef | getDefaultLogAppender () |
| Returns a copy of default LogAppenderRef. | |
| static bool | setDefaultLogAppender (const LogAppenderRef &ref) |
| Set the default global LogAppenderRef. | |
| static LogAppenderRef | getThreadLogAppender () |
| Returns a copy of the thread LogAppenderRef. | |
| static bool | setThreadLogAppender (const LogAppenderRef &ref) |
| Set a per thread LogAppenderRef that overrides the default one. | |
| static LogAppenderRef | createLogAppender (const String &name, const StringArray &components, const StringArray &categories, const String &messageFormat, const String &type, const LoggerConfigMap &configItems) |
| Create a concrete log appender depending on the type string passed in. | |
This class sends log messges to syslog.
Definition at line 51 of file SyslogAppender.hpp.
| BLOCXX_NAMESPACE::SyslogAppender::SyslogAppender | ( | const StringArray & | components, |
| const StringArray & | categories, | ||
| const String & | pattern, | ||
| const String & | identity, | ||
| const String & | facility ) |
Definition at line 135 of file SyslogAppender.cpp.
References BLOCXX_THROW, calledOpenLog, and BLOCXX_NAMESPACE::operator==().
|
virtual |
Definition at line 183 of file SyslogAppender.cpp.
|
protectedvirtual |
Implements BLOCXX_NAMESPACE::LogAppender.
Definition at line 187 of file SyslogAppender.cpp.
References BLOCXX_NAMESPACE::LogMessage::category, BLOCXX_NAMESPACE::String::equalsIgnoreCase(), i, BLOCXX_NAMESPACE::operator==(), BLOCXX_NAMESPACE::Array< T >::size(), BLOCXX_NAMESPACE::Logger::STR_DEBUG2_CATEGORY, BLOCXX_NAMESPACE::Logger::STR_DEBUG3_CATEGORY, BLOCXX_NAMESPACE::Logger::STR_DEBUG_CATEGORY, BLOCXX_NAMESPACE::Logger::STR_ERROR_CATEGORY, BLOCXX_NAMESPACE::Logger::STR_FATAL_CATEGORY, BLOCXX_NAMESPACE::Logger::STR_INFO_CATEGORY, and BLOCXX_NAMESPACE::Logger::STR_WARNING_CATEGORY.
Definition at line 63 of file SyslogAppender.hpp.
Referenced by SyslogAppender().
|
static |
Definition at line 60 of file SyslogAppender.hpp.