

Public Member Functions | |
| Any | formatAny (Any anyLogRecord, LogRecord logRecord) |
| String | format (LogRecord logRecord) |
Private Member Functions | |
| String | maskMessage (String message) |
| String | maskAttribute (String attributeValue) |
| String | maskEmptyDataContent (String content) |
Class that is responsible for formatting the log records/elements of different levels as well as assigning the right values to their attributes.
| String alma::acs::logging::formatters::AcsXMLLogFormatter::format | ( | LogRecord | logRecord | ) | [inline] |
Constructs the XML log message that can be sent to the ACS logging service.
Reimplemented in alma::acs::logging::TestAcsXMLLogFormatter.
References alma::acs::logging::LogParameterUtil::extractLongProperty(), alma::acs::logging::LogParameterUtil::extractStringProperty(), alma::acs::logging::AcsLogLevel::getAcsLevel(), alma::acs::logging::AcsLogLevel::getEntryName(), alma::acs::logging::formatters::AcsLogFormatter::getLocalHostName(), alma::acs::logging::LogParameterUtil::getNonSpecialPropertiesMapParameters(), maskAttribute(), maskEmptyDataContent(), and maskMessage().
Referenced by formatAny(), alma::acs::logging::formatters::AcsLogFormatterTest::testFormat(), alma::acs::logging::formatters::AcsLogFormatterTest::testFormatter(), alma::acs::logging::formatters::AcsLogFormatterTest::testGetLevel(), alma::acs::logging::formatters::AcsLogFormatterTest::testLogException(), and alma::acs::logging::formatters::AcsLogFormatterTest::testLoggedParameters().
| Any alma::acs::logging::formatters::AcsXMLLogFormatter::formatAny | ( | Any | anyLogRecord, | |
| LogRecord | logRecord | |||
| ) | [inline, virtual] |
Implements alma::acs::logging::formatters::AcsLogFormatter.
References format().
| String alma::acs::logging::formatters::AcsXMLLogFormatter::maskAttribute | ( | String | attributeValue | ) | [inline, private] |
Escapes characters in a log record attribute which would make the surrounding XML invalid. Since XML attributes can't use <![CDATA[..]]>, illegal characters in attributeValue are replaced with the corresponding masked XML notation.
Referenced by format().
| String alma::acs::logging::formatters::AcsXMLLogFormatter::maskEmptyDataContent | ( | String | content | ) | [inline, private] |
If a Data element has empty content (resulting in <Data></Data>), then the xerces parser would throw an exception. As a workaround, we replace the empty string with "N/A".
Referenced by format().
| String alma::acs::logging::formatters::AcsXMLLogFormatter::maskMessage | ( | String | message | ) | [inline, private] |
Escapes characters in the log message which would make the surrounding XML invalid. Embeds the message text in a <![CDATA[..]]> block.
Referenced by format().
1.6.2