com.google.gdata.util.common.logging
Class FormattingLogger

java.lang.Object
  extended by com.google.gdata.util.common.logging.FormattingLogger

public final class FormattingLogger
extends java.lang.Object

A wrapped logger chock-full of convenience methods. The introduction of varargs in Java 5 has provided two ways to further simplify logging information.

First, the level-based convenience methods such as Logger.foo(String msg) can contain an additional Object... args parameter that formats your message according to the logger's Formatter.

Second, for those times when you don't want the Formatter to manage formatting your message, you can use the FormattingLogger.xxxfmt(String fmt, Object... params) methods. These methods leverage the Java 5 String.format(String format, Object... args) method. However, logger.infofmt("%s %s", foo, bar) is slightly more efficient than logger.info(String.format("%s %s", foo, bar)) since the text is only formatted when the message is sufficiently important. It's also a little more readable.

Keep in mind that this class mixes two ways to format text: one that expects text to be formatted by the logger's Formatter and one that depends upon the new String.format(java.lang.String, java.lang.Object[]) style. If, in this class, method name ends with fmt, it's formatting using the latter. If the class method does not end with fmt, it's using the traditional formatting style. NOTE(future extenders): any time a new logfmt(java.util.logging.Level, java.lang.String, java.lang.Object...) variant is added to this class a matching logpfmt(java.util.logging.Level, java.lang.String, java.lang.String, java.lang.String, java.lang.Object...) variant must also be added, and vice versa. This enables com.google.monitoring.runtime.instrumentation.LogFasterer to do its job. by calls to the private method doLog, which sets the resource bundle. FormattingLogger does not support that yet; this functionality may change.


Nested Class Summary
static class FormattingLogger.Record
          An extension of LogRecord used to support a custom version of its private inferCaller(String) method.
 
Constructor Summary
FormattingLogger()
          Creates a new FormattingLogger.
FormattingLogger(java.lang.Class<?> cls)
          Creates a new FormattingLogger.
FormattingLogger(java.util.logging.Logger logger)
          Creates a new FormattingLogger by wrapping a Logger.
 
Method Summary
 void config(java.lang.String msg, java.lang.Object... params)
          Log a CONFIG message.
 void config(java.lang.String msg, java.lang.Throwable thrown)
          Log a CONFIG message.
 void configfmt(java.lang.String fmt, java.lang.Object... args)
          Log a CONFIG message.
 void configfmt(java.lang.String fmt, java.lang.Throwable thrown)
          Log a CONFIG message.
 void configfmt(java.lang.Throwable thrown, java.lang.String fmt, java.lang.Object... args)
          Log a CONFIG message.
 void fine(java.lang.String msg, java.lang.Object... params)
          Log a FINE message.
 void fine(java.lang.String msg, java.lang.Throwable thrown)
          Log a FINE message.
 void finefmt(java.lang.String fmt, java.lang.Object... args)
          Log a FINE message.
 void finefmt(java.lang.String fmt, java.lang.Throwable thrown)
          Log a FINE message.
 void finefmt(java.lang.Throwable thrown, java.lang.String fmt, java.lang.Object... args)
          Log a FINE message.
 void finer(java.lang.String msg, java.lang.Object... params)
          Log a FINER message.
 void finer(java.lang.String msg, java.lang.Throwable thrown)
          Log a FINER message.
 void finerfmt(java.lang.String fmt, java.lang.Object... args)
          Log a FINER message.
 void finerfmt(java.lang.String fmt, java.lang.Throwable thrown)
          Log a FINER message.
 void finerfmt(java.lang.Throwable thrown, java.lang.String fmt, java.lang.Object... args)
          Log a FINER message.
 void finest(java.lang.String msg, java.lang.Object... params)
          Log a FINEST message.
 void finest(java.lang.String msg, java.lang.Throwable thrown)
          Log a FINEST message.
 void finestfmt(java.lang.String fmt, java.lang.Object... args)
          Log a FINEST message.
 void finestfmt(java.lang.String fmt, java.lang.Throwable thrown)
          Log a FINEST message.
 void finestfmt(java.lang.Throwable thrown, java.lang.String fmt, java.lang.Object... args)
          Log a FINEST message.
 java.util.logging.Logger getFormattingLogger()
          Gets the Logger wrapped by this FormattingLogger.
 java.util.logging.Level getLevel()
          Pass-through to Logger.getLevel()
static FormattingLogger getLogger(java.lang.Class<?> cls)
          Returns an instance of FormattingLogger using the Class.getCanonicalName() as a source for the underlying logger's name.
static FormattingLogger getLogger(java.lang.String name)
          Returns an instance of FormattingLogger.
 void info(java.lang.String msg, java.lang.Object... params)
          Log an INFO message.
 void info(java.lang.String msg, java.lang.Throwable thrown)
          Log an INFO message.
 void infofmt(java.lang.String fmt, java.lang.Object... args)
          Log an INFO message.
 void infofmt(java.lang.String fmt, java.lang.Throwable thrown)
          Log an INFO message.
 void infofmt(java.lang.Throwable thrown, java.lang.String fmt, java.lang.Object... args)
          Log a INFO message.
 boolean isLoggable(java.util.logging.Level level)
          Pass-through to Logger.isLoggable(Level)
 void log(java.util.logging.Level level, java.lang.String msg, java.lang.Object... params)
          Similar to Logger.log(Level, String, Object[]), allows you to delay formatting with MessageFormat.
 void log(java.util.logging.Level level, java.lang.String msg, java.lang.Throwable thrown)
          Similar to Logger.log(Level, String, Throwable), sets the value of LogRecord.getThrown().
 void log(java.util.logging.Level level, java.lang.Throwable thrown, java.lang.String msg, java.lang.Object... params)
          Similar to Logger.log(Level, String, Throwable), but takes variable arguments and allows you to delay formatting with MessageFormat.
 void log(java.util.logging.LogRecord lr)
          Log a LogRecord.
 void logfmt(java.util.logging.Level level, java.lang.String fmt, java.lang.Object... args)
          Log a message.
 void logfmt(java.util.logging.Level level, java.lang.String fmt, java.lang.Throwable thrown)
          Log a message.
 void logfmt(java.util.logging.Level level, java.lang.Throwable thrown, java.lang.String fmt, java.lang.Object... args)
          Log a message.
 void logp(java.util.logging.Level level, java.lang.String sourceClassName, java.lang.String sourceMethodName, java.lang.String msg, java.lang.Object... params)
          Logs an event with a known context, similar to Logger.logp(java.util.logging.Level, String, String, String).
 void logp(java.util.logging.Level level, java.lang.String sourceClassName, java.lang.String sourceMethodName, java.lang.String msg, java.lang.Throwable thrown)
          Logs an event with a known context, similar to Logger.logp(java.util.logging.Level, String, String, String, Throwable).
 void logp(java.util.logging.Level level, java.lang.String sourceClassName, java.lang.String sourceMethodName, java.lang.Throwable thrown, java.lang.String msg, java.lang.Object... params)
          Logs an event with a known context, similar to Logger.logp(java.util.logging.Level, String, String, String, Throwable).
 void logpfmt(java.util.logging.Level level, java.lang.String sourceClassName, java.lang.String sourceMethodName, java.lang.String fmt, java.lang.Object... args)
          Logs an event with a known context, using explicit formatting rules.
 void logpfmt(java.util.logging.Level level, java.lang.String sourceClassName, java.lang.String sourceMethodName, java.lang.String fmt, java.lang.Throwable thrown)
          Logs an event with a known context, using explicit formatting rules.
 void logpfmt(java.util.logging.Level level, java.lang.String sourceClassName, java.lang.String sourceMethodName, java.lang.Throwable thrown, java.lang.String fmt, java.lang.Object... args)
          Logs an event with a known context, using explicit formatting rules.
 void setLevel(java.util.logging.Level level)
          Pass-through to Logger.setLevel(Level)
 void severe(java.lang.String msg, java.lang.Object... params)
          Log a SEVERE message, with an array of object arguments.
 void severe(java.lang.String msg, java.lang.Throwable thrown)
          Log a SEVERE message.
 void severefmt(java.lang.String fmt, java.lang.Object... args)
          Log a SEVERE message.
 void severefmt(java.lang.String fmt, java.lang.Throwable thrown)
          Log a SEVERE message.
 void severefmt(java.lang.Throwable thrown, java.lang.String fmt, java.lang.Object... args)
          Log a SEVERE message.
 void warning(java.lang.String msg, java.lang.Object... params)
          Log a WARNING message.
 void warning(java.lang.String msg, java.lang.Throwable thrown)
          Log a WARNING message.
 void warningfmt(java.lang.String fmt, java.lang.Object... args)
          Log a WARNING message.
 void warningfmt(java.lang.String fmt, java.lang.Throwable thrown)
          Log a WARNING message.
 void warningfmt(java.lang.Throwable thrown, java.lang.String fmt, java.lang.Object... args)
          Log a WARNING message.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FormattingLogger

public FormattingLogger(java.lang.Class<?> cls)
Creates a new FormattingLogger. This is convenience ctor that creates a named backing Logger with the name of the passed-in class.

Parameters:
cls - The class whose name will be used to name the backing logger.

FormattingLogger

public FormattingLogger()
Creates a new FormattingLogger. This is a convenience ctor that creates an anonymous backing Logger.


FormattingLogger

public FormattingLogger(java.util.logging.Logger logger)
Creates a new FormattingLogger by wrapping a Logger.

Parameters:
logger - The Logger to wrap.
Method Detail

getLogger

public static FormattingLogger getLogger(java.lang.String name)
Returns an instance of FormattingLogger.


getLogger

public static FormattingLogger getLogger(java.lang.Class<?> cls)
Returns an instance of FormattingLogger using the Class.getCanonicalName() as a source for the underlying logger's name.


getFormattingLogger

public java.util.logging.Logger getFormattingLogger()
Gets the Logger wrapped by this FormattingLogger.

Returns:
the Logger wrapped by this FormattingLogger.

log

public void log(java.util.logging.Level level,
                java.lang.String msg,
                java.lang.Object... params)
Similar to Logger.log(Level, String, Object[]), allows you to delay formatting with MessageFormat.


log

public void log(java.util.logging.Level level,
                java.lang.String msg,
                java.lang.Throwable thrown)
Similar to Logger.log(Level, String, Throwable), sets the value of LogRecord.getThrown().


log

public void log(java.util.logging.Level level,
                java.lang.Throwable thrown,
                java.lang.String msg,
                java.lang.Object... params)
Similar to Logger.log(Level, String, Throwable), but takes variable arguments and allows you to delay formatting with MessageFormat. Calls LogRecord.setThrown(Throwable) if thrown is non-null.


log

public void log(java.util.logging.LogRecord lr)
Log a LogRecord. The log message, level and other parameters are contained in the LogRecord, but the source class and method will be set if necessary.


logp

public void logp(java.util.logging.Level level,
                 java.lang.String sourceClassName,
                 java.lang.String sourceMethodName,
                 java.lang.String msg,
                 java.lang.Object... params)
Logs an event with a known context, similar to Logger.logp(java.util.logging.Level, String, String, String). However, this delays formatting of the message.

Parameters:
level - one of the message level identifiers, e.g. SEVERE
sourceClassName - the class generating this log event
sourceMethodName - the method generating this log event
msg - the basic message string
params - the parameters for the message string

logp

public void logp(java.util.logging.Level level,
                 java.lang.String sourceClassName,
                 java.lang.String sourceMethodName,
                 java.lang.String msg,
                 java.lang.Throwable thrown)
Logs an event with a known context, similar to Logger.logp(java.util.logging.Level, String, String, String, Throwable). However, this delays formatting of the message.

Parameters:
level - one of the message level identifiers, e.g. SEVERE
sourceClassName - the class generating this log event
sourceMethodName - the method generating this log event
msg - the message string
thrown - the throwable which triggered this log event

logp

public void logp(java.util.logging.Level level,
                 java.lang.String sourceClassName,
                 java.lang.String sourceMethodName,
                 java.lang.Throwable thrown,
                 java.lang.String msg,
                 java.lang.Object... params)
Logs an event with a known context, similar to Logger.logp(java.util.logging.Level, String, String, String, Throwable). However, this delays formatting of the message.

Parameters:
level - one of the message level identifiers, e.g. SEVERE
sourceClassName - the class generating this log event
sourceMethodName - the method generating this log event
thrown - the throwable which triggered this log event
msg - the basic message string
params - the parameters for the message string

isLoggable

public boolean isLoggable(java.util.logging.Level level)
Pass-through to Logger.isLoggable(Level)


getLevel

public java.util.logging.Level getLevel()
Pass-through to Logger.getLevel()


setLevel

public void setLevel(java.util.logging.Level level)
Pass-through to Logger.setLevel(Level)


logfmt

public void logfmt(java.util.logging.Level level,
                   java.lang.String fmt,
                   java.lang.Object... args)
Log a message.

If the logger currently accepts messages of the supplied level, then the fmt and args are converted to a string using String.format(String, Object[]) and forwarded to all the registered output Handler objects.

Parameters:
level - One of the message level identifiers, e.g. SEVERE
fmt - The string message (or a key in the message catalog)
args - array of parameters to the message

logfmt

public void logfmt(java.util.logging.Level level,
                   java.lang.String fmt,
                   java.lang.Throwable thrown)
Log a message.

If the logger currently accepts messages of the supplied level, then the fmt and thrown are converted to a string using String.format(String, Object[]) and forwarded to all the registered output Handler objects.

Parameters:
level - One of the message level identifiers, e.g. SEVERE
fmt - The string message (or a key in the message catalog)
thrown - the throwable which triggered this log event, and parameter to the format message

logfmt

public void logfmt(java.util.logging.Level level,
                   java.lang.Throwable thrown,
                   java.lang.String fmt,
                   java.lang.Object... args)
Log a message.

If the logger currently accepts messages of the supplied level, then the fmt and args are converted to a string using String.format(String, Object[]) and forwarded to all the registered output Handler objects.

Parameters:
level - one of the message level identifiers, e.g. SEVERE
thrown - the throwable which triggered this log event
fmt - the string message (or a key in the message catalog)
args - array of parameters to the message

logpfmt

public void logpfmt(java.util.logging.Level level,
                    java.lang.String sourceClassName,
                    java.lang.String sourceMethodName,
                    java.lang.String fmt,
                    java.lang.Object... args)
Logs an event with a known context, using explicit formatting rules.

If the logger currently accepts messages of the supplied level, then the fmt and args are converted to a string using String.format(String, Object[]) and forwarded to all the registered output Handler objects.

Parameters:
level - one of the message level identifiers, e.g. SEVERE
sourceClassName - the class generating this log event
sourceMethodName - the method generating this log event
fmt - the string message (or a key in the message catalog)
args - array of parameters to the format message

logpfmt

public void logpfmt(java.util.logging.Level level,
                    java.lang.String sourceClassName,
                    java.lang.String sourceMethodName,
                    java.lang.String fmt,
                    java.lang.Throwable thrown)
Logs an event with a known context, using explicit formatting rules.

If the logger currently accepts messages of the supplied level, then the fmt and thrown are converted to a string using String.format(String, Object[]) and forwarded to all the registered output Handler objects.

Parameters:
level - one of the message level identifiers, e.g. SEVERE
sourceClassName - the class generating this log event
sourceMethodName - the method generating this log event
fmt - the string message (or a key in the message catalog)
thrown - the throwable which triggered this log event, and parameter to the format message

logpfmt

public void logpfmt(java.util.logging.Level level,
                    java.lang.String sourceClassName,
                    java.lang.String sourceMethodName,
                    java.lang.Throwable thrown,
                    java.lang.String fmt,
                    java.lang.Object... args)
Logs an event with a known context, using explicit formatting rules.

If the logger currently accepts messages of the supplied level, then the fmt and args are converted to a string using String.format(String, Object[]) and forwarded to all the registered output Handler objects.

Parameters:
level - one of the message level identifiers, e.g. SEVERE
sourceClassName - the class generating this log event
sourceMethodName - the method generating this log event
thrown - the throwable which triggered this log event
fmt - the string message (or a key in the message catalog)
args - array of parameters to the message

severe

public void severe(java.lang.String msg,
                   java.lang.Throwable thrown)
Log a SEVERE message.

If the logger is currently enabled for the SEVERE message level then the given message is forwarded to all the registered output Handler objects.

Parameters:
msg - The string message (or a key in the message catalog)
thrown - the throwable which triggered this log event, and parameter to the message

warning

public void warning(java.lang.String msg,
                    java.lang.Throwable thrown)
Log a WARNING message.

If the logger is currently enabled for the WARNING message level then the given message is forwarded to all the registered output Handler objects.

Parameters:
msg - The string message (or a key in the message catalog)
thrown - the throwable which triggered this log event, and parameter to the message

info

public void info(java.lang.String msg,
                 java.lang.Throwable thrown)
Log an INFO message.

If the logger is currently enabled for the INFO message level then the given message is forwarded to all the registered output Handler objects.

Parameters:
msg - The string message (or a key in the message catalog)
thrown - the throwable which triggered this log event, and parameter to the message

config

public void config(java.lang.String msg,
                   java.lang.Throwable thrown)
Log a CONFIG message.

If the logger is currently enabled for the CONFIG message level then the given message is forwarded to all the registered output Handler objects.

Parameters:
msg - The string message (or a key in the message catalog)
thrown - the throwable which triggered this log event, and parameter to the message

fine

public void fine(java.lang.String msg,
                 java.lang.Throwable thrown)
Log a FINE message.

If the logger is currently enabled for the FINE message level then the given message is forwarded to all the registered output Handler objects.

Parameters:
msg - The string message (or a key in the message catalog)
thrown - the throwable which triggered this log event, and parameter to the message

finer

public void finer(java.lang.String msg,
                  java.lang.Throwable thrown)
Log a FINER message.

If the logger is currently enabled for the FINER message level then the given message is forwarded to all the registered output Handler objects.

Parameters:
msg - The string message (or a key in the message catalog)
thrown - the throwable which triggered this log event, and parameter to the message

finest

public void finest(java.lang.String msg,
                   java.lang.Throwable thrown)
Log a FINEST message.

If the logger is currently enabled for the FINEST message level then the given message is forwarded to all the registered output Handler objects.

Parameters:
msg - The string message (or a key in the message catalog)
thrown - the throwable which triggered this log event, and parameter to the message

severefmt

public void severefmt(java.lang.String fmt,
                      java.lang.Throwable thrown)
Log a SEVERE message.

If the logger currently accepts messages of the supplied level, then the fmt and thrown are converted to a string using String.format(String, Object[]) and is forwarded to all the registered output Handler objects.

Parameters:
fmt - A format string
thrown - the throwable which triggered this log event, and parameter to the formatter message
See Also:
Formatter, String.format(String, Object[])

warningfmt

public void warningfmt(java.lang.String fmt,
                       java.lang.Throwable thrown)
Log a WARNING message.

If the logger currently accepts messages of the supplied level, then the fmt and thrown are converted to a string using String.format(String, Object[]) and is forwarded to all the registered output Handler objects.

Parameters:
fmt - A format string
thrown - the throwable which triggered this log event, and parameter to the formatter message
See Also:
Formatter, String.format(String, Object[])

infofmt

public void infofmt(java.lang.String fmt,
                    java.lang.Throwable thrown)
Log an INFO message.

If the logger currently accepts messages of the supplied level, then the fmt and thrown are converted to a string using String.format(String, Object[]) and is forwarded to all the registered output Handler objects.

Parameters:
fmt - A format string
thrown - the throwable which triggered this log event, and parameter to the formatter message
See Also:
Formatter, String.format(String, Object[])

configfmt

public void configfmt(java.lang.String fmt,
                      java.lang.Throwable thrown)
Log a CONFIG message.

If the logger currently accepts messages of the supplied level, then the fmt and thrown are converted to a string using String.format(String, Object[]) and is forwarded to all the registered output Handler objects.

Parameters:
fmt - A format string
thrown - the throwable which triggered this log event, and parameter to the formatter message
See Also:
Formatter, String.format(java.util.Locale, String, Object[])

finefmt

public void finefmt(java.lang.String fmt,
                    java.lang.Throwable thrown)
Log a FINE message.

If the logger currently accepts messages of the supplied level, then the fmt and thrown are converted to a string using String.format(String, Object[]) and is forwarded to all the registered output Handler objects.

Parameters:
fmt - A format string
thrown - the throwable which triggered this log event, and parameter to the formatter message
See Also:
Formatter, String.format(String, Object[])

finerfmt

public void finerfmt(java.lang.String fmt,
                     java.lang.Throwable thrown)
Log a FINER message.

If the logger currently accepts messages of the supplied level, then the fmt and thrown are converted to a string using String.format(String, Object[]) and is forwarded to all the registered output Handler objects.

Parameters:
fmt - A format string
thrown - the throwable which triggered this log event, and parameter to the formatter message
See Also:
Formatter, String.format(String, Object[])

finestfmt

public void finestfmt(java.lang.String fmt,
                      java.lang.Throwable thrown)
Log a FINEST message.

If the logger currently accepts messages of the supplied level, then the fmt and thrown are converted to a string using String.format(String, Object[]) and is forwarded to all the registered output Handler objects.

Parameters:
fmt - A format string
thrown - the throwable which triggered this log event, and parameter to the formatter message
See Also:
Formatter, String.format(String, Object[])

severe

public void severe(java.lang.String msg,
                   java.lang.Object... params)
Log a SEVERE message, with an array of object arguments.

If the logger is currently enabled for the SEVERE message level then the given message is forwarded to all the registered output Handler objects.

Parameters:
msg - The string message (or a key in the message catalog)
params - array of parameters to the message

warning

public void warning(java.lang.String msg,
                    java.lang.Object... params)
Log a WARNING message.

If the logger is currently enabled for the WARNING message level then the given message is forwarded to all the registered output Handler objects.

Parameters:
msg - The string message (or a key in the message catalog)
params - array of parameters to the message

info

public void info(java.lang.String msg,
                 java.lang.Object... params)
Log an INFO message.

If the logger is currently enabled for the INFO message level then the given message is forwarded to all the registered output Handler objects.

Parameters:
msg - The string message (or a key in the message catalog)
params - array of parameters to the message

config

public void config(java.lang.String msg,
                   java.lang.Object... params)
Log a CONFIG message.

If the logger is currently enabled for the CONFIG message level then the given message is forwarded to all the registered output Handler objects.

Parameters:
msg - The string message (or a key in the message catalog)
params - array of parameters to the message

fine

public void fine(java.lang.String msg,
                 java.lang.Object... params)
Log a FINE message.

If the logger is currently enabled for the FINE message level then the given message is forwarded to all the registered output Handler objects.

Parameters:
msg - The string message (or a key in the message catalog)
params - array of parameters to the message

finer

public void finer(java.lang.String msg,
                  java.lang.Object... params)
Log a FINER message.

If the logger is currently enabled for the FINER message level then the given message is forwarded to all the registered output Handler objects.

Parameters:
msg - The string message (or a key in the message catalog)
params - array of parameters to the message

finest

public void finest(java.lang.String msg,
                   java.lang.Object... params)
Log a FINEST message.

If the logger is currently enabled for the FINEST message level then the given message is forwarded to all the registered output Handler objects.

Parameters:
msg - The string message (or a key in the message catalog)
params - array of parameters to the message

severefmt

public void severefmt(java.lang.String fmt,
                      java.lang.Object... args)
Log a SEVERE message.

If the logger currently accepts messages of the supplied level, then the fmt and args are converted to a string using String.format(String, Object[]) and is forwarded to all the registered output Handler objects.

Parameters:
fmt - A format string
args - array of parameters to the formatter
See Also:
Formatter, String.format(String, Object[])

warningfmt

public void warningfmt(java.lang.String fmt,
                       java.lang.Object... args)
Log a WARNING message.

If the logger currently accepts messages of the supplied level, then the fmt and args are converted to a string using String.format(String, Object[]) and is forwarded to all the registered output Handler objects.

Parameters:
fmt - A format string
args - array of parameters to the formatter
See Also:
Formatter, String.format(String, Object[])

infofmt

public void infofmt(java.lang.String fmt,
                    java.lang.Object... args)
Log an INFO message.

If the logger currently accepts messages of the supplied level, then the fmt and args are converted to a string using String.format(String, Object[]) and is forwarded to all the registered output Handler objects.

Parameters:
fmt - A format string
args - array of parameters to the formatter
See Also:
Formatter, String.format(String, Object[])

configfmt

public void configfmt(java.lang.String fmt,
                      java.lang.Object... args)
Log a CONFIG message.

If the logger currently accepts messages of the supplied level, then the fmt and args are converted to a string using String.format(String, Object[]) and is forwarded to all the registered output Handler objects.

Parameters:
fmt - A format string
args - array of parameters to the formatter
See Also:
Formatter, String.format(java.util.Locale, String, Object[])

finefmt

public void finefmt(java.lang.String fmt,
                    java.lang.Object... args)
Log a FINE message.

If the logger currently accepts messages of the supplied level, then the fmt and args are converted to a string using String.format(String, Object[]) and is forwarded to all the registered output Handler objects.

Parameters:
fmt - A format string
args - array of parameters to the formatter
See Also:
Formatter, String.format(String, Object[])

finerfmt

public void finerfmt(java.lang.String fmt,
                     java.lang.Object... args)
Log a FINER message.

If the logger currently accepts messages of the supplied level, then the fmt and args are converted to a string using String.format(String, Object[]) and is forwarded to all the registered output Handler objects.

Parameters:
fmt - A format string
args - array of parameters to the formatter
See Also:
Formatter, String.format(String, Object[])

finestfmt

public void finestfmt(java.lang.String fmt,
                      java.lang.Object... args)
Log a FINEST message.

If the logger currently accepts messages of the supplied level, then the fmt and args are converted to a string using String.format(String, Object[]) and is forwarded to all the registered output Handler objects.

Parameters:
fmt - A format string
args - array of parameters to the formatter
See Also:
Formatter, String.format(String, Object[])

severefmt

public void severefmt(java.lang.Throwable thrown,
                      java.lang.String fmt,
                      java.lang.Object... args)
Log a SEVERE message.

If the logger currently accepts messages of the supplied level, then the fmt and args are converted to a string using String.format(String, Object[]) and forwarded to all the registered output Handler objects.

Parameters:
thrown - the throwable which triggered this log event
fmt - the string message (or a key in the message catalog)
args - array of parameters to the message

warningfmt

public void warningfmt(java.lang.Throwable thrown,
                       java.lang.String fmt,
                       java.lang.Object... args)
Log a WARNING message.

If the logger currently accepts messages of the supplied level, then the fmt and args are converted to a string using String.format(String, Object[]) and forwarded to all the registered output Handler objects.

Parameters:
thrown - the throwable which triggered this log event
fmt - the string message (or a key in the message catalog)
args - array of parameters to the message

infofmt

public void infofmt(java.lang.Throwable thrown,
                    java.lang.String fmt,
                    java.lang.Object... args)
Log a INFO message.

If the logger currently accepts messages of the supplied level, then the fmt and args are converted to a string using String.format(String, Object[]) and forwarded to all the registered output Handler objects.

Parameters:
thrown - the throwable which triggered this log event
fmt - the string message (or a key in the message catalog)
args - array of parameters to the message

configfmt

public void configfmt(java.lang.Throwable thrown,
                      java.lang.String fmt,
                      java.lang.Object... args)
Log a CONFIG message.

If the logger currently accepts messages of the supplied level, then the fmt and args are converted to a string using String.format(String, Object[]) and forwarded to all the registered output Handler objects.

Parameters:
thrown - the throwable which triggered this log event
fmt - the string message (or a key in the message catalog)
args - array of parameters to the message

finefmt

public void finefmt(java.lang.Throwable thrown,
                    java.lang.String fmt,
                    java.lang.Object... args)
Log a FINE message.

If the logger currently accepts messages of the supplied level, then the fmt and args are converted to a string using String.format(String, Object[]) and forwarded to all the registered output Handler objects.

Parameters:
thrown - the throwable which triggered this log event
fmt - the string message (or a key in the message catalog)
args - array of parameters to the message

finerfmt

public void finerfmt(java.lang.Throwable thrown,
                     java.lang.String fmt,
                     java.lang.Object... args)
Log a FINER message.

If the logger currently accepts messages of the supplied level, then the fmt and args are converted to a string using String.format(String, Object[]) and forwarded to all the registered output Handler objects.

Parameters:
thrown - the throwable which triggered this log event
fmt - the string message (or a key in the message catalog)
args - array of parameters to the message

finestfmt

public void finestfmt(java.lang.Throwable thrown,
                      java.lang.String fmt,
                      java.lang.Object... args)
Log a FINEST message.

If the logger currently accepts messages of the supplied level, then the fmt and args are converted to a string using String.format(String, Object[]) and forwarded to all the registered output Handler objects.

Parameters:
thrown - the throwable which triggered this log event
fmt - the string message (or a key in the message catalog)
args - array of parameters to the message