Package oracle.jdbc.diagnostics
Class OracleXMLFormatter
- java.lang.Object
-
- java.util.logging.Formatter
-
- java.util.logging.XMLFormatter
-
- oracle.jdbc.diagnostics.OracleXMLFormatter
-
public class OracleXMLFormatter extends java.util.logging.XMLFormatterFormat a LogRecord into a standard XML format. Add Oracle specific logging parameters, if present.
-
-
Constructor Summary
Constructors Constructor Description OracleXMLFormatter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voida2(java.lang.StringBuilder sb, int x)Append a two-digit number.protected voidappendEndTag(java.lang.StringBuilder sb)protected voidappendSecurityLabel(java.lang.StringBuilder sb, OracleLogRecord record)protected voidappendStartTag(java.lang.StringBuilder sb)protected voidappendTraceAttributes(java.lang.StringBuilder sb, OracleLogRecord record)The only thing new about this class is that it adds the trace attributes, if any, to the log node.protected voidescape(java.lang.StringBuilder sb, java.lang.String text)Append to the given StringBuilder an escaped version of the given text string where XML special characters have been escaped.java.lang.Stringformat(java.util.logging.LogRecord record)Format a LogRecord into a standard XML format.
-
-
-
Method Detail
-
format
public java.lang.String format(java.util.logging.LogRecord record)
Format a LogRecord into a standard XML format. Add Oracle specific logging parameters, if present.- Overrides:
formatin classjava.util.logging.XMLFormatter- Parameters:
record- the log record to be formatted.- Returns:
- a formatted log record
-
appendStartTag
protected void appendStartTag(java.lang.StringBuilder sb)
-
appendSecurityLabel
protected void appendSecurityLabel(java.lang.StringBuilder sb, OracleLogRecord record)
-
appendTraceAttributes
protected void appendTraceAttributes(java.lang.StringBuilder sb, OracleLogRecord record)The only thing new about this class is that it adds the trace attributes, if any, to the log node.- Parameters:
record-sb-
-
appendEndTag
protected void appendEndTag(java.lang.StringBuilder sb)
-
a2
protected void a2(java.lang.StringBuilder sb, int x)Append a two-digit number. Identical to the private method of the same signature defined in java.util.logging.XMLFormatter.
-
escape
protected void escape(java.lang.StringBuilder sb, java.lang.String text)Append to the given StringBuilder an escaped version of the given text string where XML special characters have been escaped. For a null string we append "<null>" Identical to the private method of the same signature defined in java.util.logging.XMLFormatter.
-
-