| java.lang.Object java.util.logging.Formatter au.id.jericho.lib.html.BasicLogFormatter
BasicLogFormatter | public class BasicLogFormatter extends Formatter (Code) | | Provides basic formatting for log messages.
This class extends the java.util.logging.Formatter class, allowing it to be specified as a formatter for the java.util.logging system.
The static
BasicLogFormatter.format(String level,String message,String loggerName) method provides a means of using the same formatting
outside of the java.util.logging framework. See the documentation of this method for more details.
|
Method Summary | |
public String | format(LogRecord logRecord) Returns a formatted string representing the log entry information contained in the specified java.util.logging.LogRecord .
This method is not called directly, but is used by the java.util.logging framework when this class is specified
as a formatter in the logging.properties file.
See the documentation of the parent java.util.logging.Formatter class in the Java SDK for more details.
Parameters: logRecord - a java.util.logging.LogRecord object containing all of the log entry information. | public static String | format(String level, String message, String loggerName) Returns a formatted string representing the specified log entry information.
This method is used by the
WriterLogger class to format its output.
The static properties
BasicLogFormatter.OutputLevel and
BasicLogFormatter.OutputName affect what information is included in the output.
The
Config.NewLine static property determines the character sequence used for line breaks.
A line of output typically looks like this:
INFO: this is the log message
or if the
BasicLogFormatter.OutputName property is set to true , the output would look similar to this:
INFO: [net.htmlparser.jericho] this is the log message
Parameters: level - a string representing the logging level of the log entry. Parameters: message - the log message. Parameters: loggerName - the name of the logger. |
OutputName | public static boolean OutputName(Code) | | Determines whether the logger name is included in the output.
The default value is false .
The logger name used for all automatically created
Logger instances is "net.htmlparser.jericho ".
As this is a static property, changing the value will affect all BasicLogFormatter instances, as well as the behaviour of the
static
BasicLogFormatter.format(String level,String message,String loggerName) method.
|
format | public String format(LogRecord logRecord)(Code) | | Returns a formatted string representing the log entry information contained in the specified java.util.logging.LogRecord .
This method is not called directly, but is used by the java.util.logging framework when this class is specified
as a formatter in the logging.properties file.
See the documentation of the parent java.util.logging.Formatter class in the Java SDK for more details.
Parameters: logRecord - a java.util.logging.LogRecord object containing all of the log entry information. a formatted string representing the log entry information contained in the specified java.util.logging.LogRecord . |
format | public static String format(String level, String message, String loggerName)(Code) | | Returns a formatted string representing the specified log entry information.
This method is used by the
WriterLogger class to format its output.
The static properties
BasicLogFormatter.OutputLevel and
BasicLogFormatter.OutputName affect what information is included in the output.
The
Config.NewLine static property determines the character sequence used for line breaks.
A line of output typically looks like this:
INFO: this is the log message
or if the
BasicLogFormatter.OutputName property is set to true , the output would look similar to this:
INFO: [net.htmlparser.jericho] this is the log message
Parameters: level - a string representing the logging level of the log entry. Parameters: message - the log message. Parameters: loggerName - the name of the logger. a formatted string representing the specified log entry information. |
|
|