Class OracleSimpleFormatter


  • public class OracleSimpleFormatter
    extends java.util.logging.SimpleFormatter
    Print a brief summary of the LogRecord in a human readable format. The summary will typically be 1 or 2 lines.

    Configuration: The SimpleFormatter is initialized with the format string specified in the java.util.logging.SimpleFormatter.format property to format the log messages. This property can be defined in the logging properties configuration file or as a system property. If this property is set in both the logging properties and system properties, the format string specified in the system property will be used. If this property is not defined or the given format string is illegal, the default format is implementation-specific.

    Since:
    1.4
    See Also:
    Formatter
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String formatMessage​(java.util.logging.LogRecord record)
      Localize and format the message string from a log record.
      • Methods inherited from class java.util.logging.SimpleFormatter

        format
      • Methods inherited from class java.util.logging.Formatter

        getHead, getTail
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • OracleSimpleFormatter

        public OracleSimpleFormatter()
    • Method Detail

      • 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.

        • If there are no parameters, no formatter is used.
        • Otherwise, if the string contains "{0}" then java.text.MessageFormat is used to format the string.
        • Otherwise no formatting is performed.

        Overrides:
        formatMessage in class java.util.logging.Formatter
        Parameters:
        record - the log record containing the raw message
        Returns:
        a localized and formatted message