Qwylt

java.lang.module.spi
Class Logger

java.lang.Object
  extended by java.lang.module.spi.Logger

public class Logger
extends java.lang.Object

A logging utility class for use with static imports.

Since:
Jan 13, 2009
Author:
Bryan Atsatt

Field Summary
static java.lang.String LOG_LEVEL_KEY
           
static java.lang.String LOGGER_NAME
           
 
Constructor Summary
Logger()
           
 
Method Summary
static void logFine(java.lang.String message)
          Log the specified message at Level.FINE.
static void logFiner(java.lang.String message)
          Log the specified message at Level.FINE.
static void logFinest(java.lang.String message)
          Log the specified message at Level.FINE.
static void logInfo(java.lang.String message)
          Log the specified message at Level.INFO.
static boolean logsFine()
          Test if the level.FINEST will be logged.
static boolean logsFiner()
          Test if the level.FINER will be logged.
static boolean logsFinest()
          Test if the level.FINEST will be logged.
static void logUptime(java.lang.String milestone)
          Log the number of milliseconds since the process start iff the level is at FINE or below.
static void logWarning(java.lang.String message)
          Log the specified message at Level.WARNING.
static void logWarning(java.lang.String message, java.lang.Throwable error)
          Log the specified message at Level.WARNING.
static void setLevel(java.util.logging.Level level)
          Set the level.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOGGER_NAME

public static final java.lang.String LOGGER_NAME
See Also:
Constant Field Values

LOG_LEVEL_KEY

public static final java.lang.String LOG_LEVEL_KEY
See Also:
Constant Field Values
Constructor Detail

Logger

public Logger()
Method Detail

setLevel

public static void setLevel(java.util.logging.Level level)
Set the level.

Parameters:
level - The new level.

logsFinest

public static boolean logsFinest()
Test if the level.FINEST will be logged.

Returns:
True if will log.

logsFiner

public static boolean logsFiner()
Test if the level.FINER will be logged.

Returns:
True if will log.

logsFine

public static boolean logsFine()
Test if the level.FINEST will be logged.

Returns:
True if will log.

logFinest

public static void logFinest(java.lang.String message)
Log the specified message at Level.FINE.

Parameters:
message - The message.

logFiner

public static void logFiner(java.lang.String message)
Log the specified message at Level.FINE.

Parameters:
message - The message.

logFine

public static void logFine(java.lang.String message)
Log the specified message at Level.FINE.

Parameters:
message - The message.

logInfo

public static void logInfo(java.lang.String message)
Log the specified message at Level.INFO.

Parameters:
message - The message.

logWarning

public static void logWarning(java.lang.String message)
Log the specified message at Level.WARNING.

Parameters:
message - The message.

logWarning

public static void logWarning(java.lang.String message,
                              java.lang.Throwable error)
Log the specified message at Level.WARNING.

Parameters:
message - The message.
error - The error.

logUptime

public static void logUptime(java.lang.String milestone)
Log the number of milliseconds since the process start iff the level is at FINE or below.

Parameters:
milestone - The milestone name.

Qwylt

Send comments or questions to Bryan Atsatt