All Packages Class Hierarchy This Package Previous Next Index
Class com.ups.xmlsdk.util.logging.XMLLogFormatter
java.lang.Object
|
+----com.ups.xmlsdk.util.logging.XMLLogFormatter
- public class XMLLogFormatter
- extends Object
- implements LogFormatter
Implement a default log record formatting class.
-
XMLLogFormatter()
-
-
appendAscii(int, StringBuffer, char)
- Append a character to the buffer as a readable 7-bit US ASCII string.
-
format(StringBuffer, Date, String, int, String, String, long)
-
-
formatField(StringBuffer, String, int, boolean)
- Make up for weak output formatting in java Format classes
-
formatHeader(StringBuffer, Date, String, int, String, boolean)
- Format a log record header and append to the buffer.
-
formatMessage(int, StringBuffer, String, long)
- Append a message and code to the buffer.
-
getMaxRecLen()
-
-
setMaxRecLen(int)
-
XMLLogFormatter
public XMLLogFormatter()
appendAscii
public final int appendAscii(int spaceLeft,
StringBuffer buf,
char c)
- Append a character to the buffer as a readable 7-bit US ASCII string. For
characters in the range 0x20-0x7e, this is a single printable character,
otherwise it is a 2-character ascii hex sequence of the form .
For greater than 8-bit characters it is a 4-byte delimited hex sequence
.
- Returns:
- the length in bytes of the appended string.
format
public void format(StringBuffer buf,
Date time,
String facility,
int priority,
String id,
String msg,
long code) throws LogException
formatField
public static StringBuffer formatField(StringBuffer sb,
String s,
int width,
boolean left)
- Make up for weak output formatting in java Format classes
formatHeader
public void formatHeader(StringBuffer buf,
Date time,
String facility,
int priority,
String id,
boolean cont)
- Format a log record header and append to the buffer.
formatMessage
public String formatMessage(int hdrLen,
StringBuffer buf,
String msg,
long code)
- Append a message and code to the buffer. If the record exceeds the
allowable record length return a non-null String remainder.
getMaxRecLen
public int getMaxRecLen()
setMaxRecLen
public void setMaxRecLen(int m)
All Packages Class Hierarchy This Package Previous Next Index