com.mobixess.jodb.util.logging
Class SimpleConsoleHandler

java.lang.Object
  extended by java.util.logging.Handler
      extended by java.util.logging.StreamHandler
          extended by java.util.logging.ConsoleHandler
              extended by com.mobixess.jodb.util.logging.SimpleConsoleHandler

public class SimpleConsoleHandler
extends java.util.logging.ConsoleHandler


Constructor Summary
SimpleConsoleHandler()
           
 
Method Summary
 java.lang.String format(java.util.logging.LogRecord record)
          Format the given LogRecord.
 java.lang.String formatMessage(java.util.logging.LogRecord record)
          Localize and format the message string from a log record.
protected  java.lang.String getLineAndSrc()
           
 void publish(java.util.logging.LogRecord record)
           
 
Methods inherited from class java.util.logging.ConsoleHandler
close
 
Methods inherited from class java.util.logging.StreamHandler
flush, isLoggable, setEncoding, setOutputStream
 
Methods inherited from class java.util.logging.Handler
getEncoding, getErrorManager, getFilter, getFormatter, getLevel, reportError, setErrorManager, setFilter, setFormatter, setLevel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleConsoleHandler

public SimpleConsoleHandler()
Method Detail

publish

public void publish(java.util.logging.LogRecord record)
Overrides:
publish in class java.util.logging.ConsoleHandler

format

public java.lang.String format(java.util.logging.LogRecord record)
Format the given LogRecord.

Parameters:
record - the log record to be formatted.
Returns:
a formatted log record

getLineAndSrc

protected java.lang.String getLineAndSrc()

formatMessage

public java.lang.String formatMessage(java.util.logging.LogRecord record)
Localize and format the message string from a log record. This method is provided as a convenience for Formatter subclasses to use when they are performing formatting.

The message string is first localized to a format string using the record's ResourceBundle. (If there is no ResourceBundle, or if the message key is not found, then the key is used as the format string.) The format String uses java.text style formatting.

Parameters:
record - the log record containing the raw message
Returns:
a localized and formatted message


Copyright © Mobixess Inc. All Rights Reserved.