Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

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]
 

Constructs the XML log message that can be sent to the ACS logging service.

See also:
java.util.logging.Formatter#format(java.util.logging.LogRecord)

Any alma::acs::logging::formatters::AcsXMLLogFormatter::formatAny Any  anyLogRecord,
LogRecord  logRecord
[inline, virtual]
 

Implements alma::acs::logging::formatters::AcsLogFormatter.

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 atttribute value
See also:
XmlNormalizer#normalize(java.lang.String)

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".

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


The documentation for this class was generated from the following file:
Generated on Thu Apr 30 02:53:53 2009 for ACS Java API by doxygen 1.3.8