alma::acs::logging::formatters::AcsXMLLogFormatter Class Reference

Inheritance diagram for alma::acs::logging::formatters::AcsXMLLogFormatter:
Inheritance graph
[legend]
Collaboration diagram for alma::acs::logging::formatters::AcsXMLLogFormatter:
Collaboration graph
[legend]

List of all members.

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)

Detailed Description

Author:
rgeorgie

Class that is responsible for formatting the log records/elements of different levels as well as assigning the right values to their attributes.


Member Function Documentation

String alma::acs::logging::formatters::AcsXMLLogFormatter::format ( LogRecord  logRecord  )  [inline]
Any alma::acs::logging::formatters::AcsXMLLogFormatter::formatAny ( Any  anyLogRecord,
LogRecord  logRecord 
) [inline, virtual]
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.

Returns:
the masked attribute value
See also:
XmlNormalizer::normalize(java.lang.String)

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.

Returns:
the masked message

Referenced by format().


The documentation for this class was generated from the following file:

Generated by  doxygen 1.6.2