|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.logging.Formatter
com.sun.sgs.impl.sharedutil.logging.LogFormatter
public class LogFormatter
Defines a logging Formatter that uses a compact date and time format
that includes milliseconds, permits the date and time format to be
customized, and allows suppressing stack traces for exceptions.
This class recognizes the following LogManager configuration
properties:
Formatter.format to display the date and time of a
logging call. The argument to the format call will be a long
representing the current time in milliseconds. The default prints the
time in the format 2008-02-14 11:52:59.679.
true
For example, to use this class to format logging output to the console so that it prints the time in milliseconds since the epoch and does not include stack traces, put the following text in the logging configuration file:
.level=INFO handlers=java.util.logging.ConsoleHandler java.util.logging.ConsoleHandler.formatter=com.sun.sgs.impl.sharedutil.logging.LogFormatter com.sun.sgs.impl.sharedutil.logging.LogFormatter.time.format=%tQ com.sun.sgs.impl.sharedutil.logging.LogFormatter.print.stack=false
| Field Summary | |
|---|---|
static String |
DEFAULT_TIME_FORMAT
The default time format string. |
static String |
PRINT_STACK_PROPERTY
The logging property for specifying whether to print stack traces when logging a thrown exception. |
static String |
TIME_FORMAT_PROPERTY
The logging property for specifying the time format. |
| Constructor Summary | |
|---|---|
LogFormatter()
Creates an instance of this class. |
|
| Method Summary | |
|---|---|
String |
format(LogRecord record)
|
| Methods inherited from class java.util.logging.Formatter |
|---|
formatMessage, getHead, getTail |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String DEFAULT_TIME_FORMAT
public static final String TIME_FORMAT_PROPERTY
public static final String PRINT_STACK_PROPERTY
| Constructor Detail |
|---|
public LogFormatter()
| Method Detail |
|---|
public String format(LogRecord record)
format in class Formatter
|
Project Darkstar, Version 0.9.11.3 2013-07-29 21:53:29 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||