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

abeans::pluggable::acs::logging::LoggingFormatter Class Reference

Inheritance diagram for abeans::pluggable::acs::logging::LoggingFormatter:

Inheritance graph
[legend]
Collaboration diagram for abeans::pluggable::acs::logging::LoggingFormatter:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 LoggingFormatter ()
String getHost ()
String format (LogRecord record)

Private Member Functions

long extractLongProperty (String name, Map properties, long defaultValue)
String extractStringProperty (String name, Map properties, String defaultValue)
Map extractMapProperty (String name, Map properties, Map defaultValue)

Static Private Attributes

final SimpleDateFormat timeFormatter
String host = null
final String CDATA_PREFIX = "<![CDATA["
final String CDATA_POSTFIX = "]]>"
final String INIT_METHOD_NAME = "<init>"
final String INIT_METHOD_NAME_REPLACEMENT = "&lt;init&gt;"

Detailed Description

Efficient ACS XML logging formatter.

Author:
Matej Sekoranja (matej.sekoranja@cosylab.com)
Version:
@VERSION@


Constructor & Destructor Documentation

abeans::pluggable::acs::logging::LoggingFormatter::LoggingFormatter  )  [inline]
 

Constructor for LoggingFormatter.


Member Function Documentation

long abeans::pluggable::acs::logging::LoggingFormatter::extractLongProperty String  name,
Map  properties,
long  defaultValue
[inline, private]
 

Extract property with specified name of type long from the Map contained in the object of type java.lang.Long.

Parameters:
name name of the property
properties map of prdoperties
defaultValue value returned if failed to obtain property value
Returns:
value, defaultValue on failure

Map abeans::pluggable::acs::logging::LoggingFormatter::extractMapProperty String  name,
Map  properties,
Map  defaultValue
[inline, private]
 

Extract property with specified name of type Map from the Map contained in the object of type java.util.Map.

Parameters:
name name of the property
properties map of prdoperties
defaultValue value returned if failed to obtain property value
Returns:
value, defaultValue on failure

String abeans::pluggable::acs::logging::LoggingFormatter::extractStringProperty String  name,
Map  properties,
String  defaultValue
[inline, private]
 

Extract property with specified name of type String from the Map contained in the object of type java.lang.String.

Parameters:
name name of the property
properties map of prdoperties
defaultValue value returned if failed to obtain property value
Returns:
value, defaultValue on failure

String abeans::pluggable::acs::logging::LoggingFormatter::format LogRecord  record  )  [inline]
 

Formats record to ACS logging XML string.

Additional parameters should be stored as java.util.Map object in record parameters, obtained using java.util.logging.LogRecord#getParameters() method. Suppoted key-value pairs are:

  • Line - java.lang.Long
  • Context - java.lang.String
  • StackId - java.lang.String
  • StackLevel - java.lang.Long
  • Uri - java.lang.String
  • Priority - java.lang.Long
  • Data - java.util.Map
  • Attributes - java.util.Map
  • ThreadName - java.lang.String

See 'Logging and Archiving' document for details.

See also:
java.util.logging.LogRecord#getParameters()

java.util.logging.Formatter#format(LogRecord)

String abeans::pluggable::acs::logging::LoggingFormatter::getHost  )  [inline]
 

Returns the name of the locahost.

Returns:
the name of the locahost


Member Data Documentation

final String abeans::pluggable::acs::logging::LoggingFormatter::CDATA_POSTFIX = "]]>" [static, private]
 

XML CDATA postfix string.

final String abeans::pluggable::acs::logging::LoggingFormatter::CDATA_PREFIX = "<![CDATA[" [static, private]
 

XML CDATA prefix string.

String abeans::pluggable::acs::logging::LoggingFormatter::host = null [static, private]
 

Name of the localhost;

final String abeans::pluggable::acs::logging::LoggingFormatter::INIT_METHOD_NAME = "<init>" [static, private]
 

Constructor (init) method name (Java specific).

final String abeans::pluggable::acs::logging::LoggingFormatter::INIT_METHOD_NAME_REPLACEMENT = "&lt;init&gt;" [static, private]
 

Constructor (init) method name (Java specific) send by this formatter, since '<' cannot appear in attribute value.

final SimpleDateFormat abeans::pluggable::acs::logging::LoggingFormatter::timeFormatter [static, private]
 

Initial value:

new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS")
ISO 8601 date formatter.


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