#include <LogAppender.hpp>
Inheritance diagram for BLOCXX_NAMESPACE::LogAppender:
Public Member Functions | |
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 Member Functions | |
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. | |
Static Public Attributes | |
static const char *const | LOG_1_LOCATION_opt = "log.%1.location" |
static const char *const | LOG_1_MAX_FILE_SIZE_opt = "log.%1.max_file_size" |
static const char *const | LOG_1_MAX_BACKUP_INDEX_opt = "log.%1.max_backup_index" |
static const char *const | LOG_1_FLUSH_opt = "log.%1.flush" |
static const char *const | LOG_1_SYSLOG_IDENTITY_opt = "log.%1.identity" |
static const char *const | LOG_1_SYSLOG_FACILITY_opt = "log.%1.facility" |
static const StringArray | ALL_COMPONENTS |
Pass to createLogAppender to indicate all components. | |
static const StringArray | ALL_CATEGORIES |
Pass to createLogAppender to indicate all categories. | |
static const String | STR_TTCC_MESSAGE_FORMAT |
The Log4j TTCC message format - TTCC is acronym for Time Thread Category Component. | |
static const String | TYPE_SYSLOG |
String of the type of the syslog log appender. | |
static const String | TYPE_STDERR |
String of the type of the stderr log appender. | |
static const String | TYPE_FILE |
String of the type of the file log appender. | |
static const String | TYPE_NULL |
String of the type of the null log appender. | |
Protected Member Functions | |
LogAppender (const StringArray &components, const StringArray &categories, const String &pattern) | |
Private Member Functions | |
virtual void | doProcessLogMessage (const String &formattedMessage, const LogMessage &message) const =0 |
Private Attributes | |
SortedVectorSet< String > | m_components |
bool | m_allComponents |
SortedVectorSet< String > | m_categories |
bool | m_allCategories |
LogMessagePatternFormatter | m_formatter |
Definition at line 72 of file LogAppender.hpp.
|
Definition at line 97 of file LogAppender.cpp. |
|
Definition at line 75 of file LogAppender.cpp. References BLOCXX_NAMESPACE::SortedVectorSet< T, Compare >::count(), m_allCategories, m_allComponents, m_categories, and m_components. |
|
Definition at line 103 of file LogAppender.cpp. References BLOCXX_NAMESPACE::SortedVectorSet< T, Compare >::count(), m_allCategories, and m_categories. Referenced by componentAndCategoryAreEnabled(), and getLogLevel(). |
|
Definition at line 110 of file LogAppender.cpp. References categoryIsEnabled(), BLOCXX_NAMESPACE::SortedVectorSet< T, Compare >::count(), m_allComponents, and m_components. Referenced by logMessage(). |
|
Create a concrete log appender depending on the type string passed in. If type == "syslog" a logger that writes to the syslog will be returned. If type == "" || type == "null" a logger that doesn't do anything will be returned. If type == "stderr" a logger that writes to stderr will be returned. Otherwise type is treated as a filename and a logger that writes to that file will be returned.
Definition at line 148 of file LogAppender.cpp. References BLOCXX_NAMESPACE::String::empty(), BLOCXX_NAMESPACE::String::equalsIgnoreCase(), and TYPE_NULL. |
|
Implemented in BLOCXX_NAMESPACE::CerrAppender, BLOCXX_NAMESPACE::FileAppender, BLOCXX_NAMESPACE::NullAppender, and BLOCXX_NAMESPACE::SyslogAppender. Referenced by logMessage(). |
|
|
Log a message using the specified component and category.
Definition at line 86 of file LogAppender.cpp. References BLOCXX_NAMESPACE::LogMessage::category, BLOCXX_NAMESPACE::LogMessage::component, componentAndCategoryAreEnabled(), doProcessLogMessage(), BLOCXX_NAMESPACE::LogMessagePatternFormatter::formatMessage(), m_formatter, and BLOCXX_NAMESPACE::StringBuffer::releaseString(). |
|
Pass to createLogAppender to indicate all categories.
Definition at line 132 of file LogAppender.hpp. |
|
Pass to createLogAppender to indicate all components.
Definition at line 130 of file LogAppender.hpp. |
|
Definition at line 80 of file LogAppender.hpp. |
|
Definition at line 77 of file LogAppender.hpp. |
|
Definition at line 79 of file LogAppender.hpp. |
|
Definition at line 78 of file LogAppender.hpp. |
|
Definition at line 82 of file LogAppender.hpp. |
|
Definition at line 81 of file LogAppender.hpp. |
|
Definition at line 156 of file LogAppender.hpp. Referenced by categoryIsEnabled(), getLogLevel(), and LogAppender(). |
|
Definition at line 154 of file LogAppender.hpp. Referenced by componentAndCategoryAreEnabled(), and LogAppender(). |
|
Definition at line 155 of file LogAppender.hpp. Referenced by categoryIsEnabled(), getLogLevel(), and LogAppender(). |
|
Definition at line 153 of file LogAppender.hpp. Referenced by componentAndCategoryAreEnabled(), and LogAppender(). |
|
Definition at line 158 of file LogAppender.hpp. Referenced by logMessage(). |
|
The Log4j TTCC message format - TTCC is acronym for Time Thread Category Component. "%r [%t] %-5p %c - %m" Definition at line 135 of file LogAppender.hpp. |
|
String of the type of the file log appender.
Definition at line 141 of file LogAppender.hpp. |
|
String of the type of the null log appender.
Definition at line 143 of file LogAppender.hpp. Referenced by createLogAppender(). |
|
String of the type of the stderr log appender.
Definition at line 139 of file LogAppender.hpp. |
|
String of the type of the syslog log appender.
Definition at line 137 of file LogAppender.hpp. |