| java.lang.Object java.util.logging.Formatter org.vfny.geoserver.global.Log4JFormatter
Log4JFormatter | public class Log4JFormatter extends Formatter (Code) | | Log4JFormatter looks like:
[core FINE] A log message logged with level FINE from the "org.geotools.core"
logger.
A formatter writting log message on a single line. This formatter is used by
GeoServer instead of
SimpleFormatter . The main difference is that
this formatter use only one line per message instead of two. For example, a
message formatted by
author: Martin Desruisseaux author: Rob Hranac version: $Id: Log4JFormatter.java,v 1.3 2002/08/19 18:15:30 desruisseaux Exp |
Constructor Summary | |
public | Log4JFormatter(String base) Construct a Log4JFormatter .
Parameters: base - The base logger name. |
Method Summary | |
public synchronized String | format(LogRecord record) Format the given log record and return the formatted string.
Parameters: record - the log record to be formatted. | public static void | init(String base, Level filterLevel) Setup a Log4JFormatter for the specified logger and its
children. | static void | setHeaderWidth(int margin) Set the header width. |
Log4JFormatter | public Log4JFormatter(String base)(Code) | | Construct a Log4JFormatter .
Parameters: base - The base logger name. This is used for shortening the loggername when formatting message. For example, if the base loggername is "org.geotools" and a log record come from the"org.geotools.core" logger, it will be formatted as "[LEVELcore]" (i.e. the "org.geotools" part is ommited). |
format | public synchronized String format(LogRecord record)(Code) | | Format the given log record and return the formatted string.
Parameters: record - the log record to be formatted. a formatted log record throws: AssertionError - Should never occur. |
init | public static void init(String base, Level filterLevel)(Code) | | Setup a Log4JFormatter for the specified logger and its
children. This method search for all instances of
ConsoleHandler using the
SimpleFormatter . If such instances
are found, they are replaced by a single instance of
Log4JFormatter writting to the
(instead of the
). This action has no effect on any loggers
outside the base namespace.
Parameters: base - The base logger name to apply the change on (e.g."org.geotools"). Parameters: filterLevel - The level to log at - overrides user prefs. |
setHeaderWidth | static void setHeaderWidth(int margin)(Code) | | Set the header width. This is the default value to use for
Log4JFormatter.margin for next
Log4JFormatter to be created.
Parameters: margin - the size of the margin to set. |
|
|