nl.tudelft.simulation.logger
Class Logger

java.lang.Object
  extended by nl.tudelft.simulation.logger.Logger

public final class Logger
extends java.lang.Object

Provides a static class to Sun's logging framework.

(c) copyright 2002-2005 Delft University of Technology , the Netherlands.
See for project information www.simulation.tudelft.nl
License of use: Lesser General Public License (LGPL) , no warranty.

Since:
1.5
Version:
$Revision: 1.5 $ $Date: 2005/07/04 12:22:38 $
Author:
Peter Jacobs

Field Summary
static nl.tudelft.simulation.event.util.EventProducingMap<java.lang.String,java.util.logging.Logger> LOGGERS
          loggers are the currently available loggers
 
Method Summary
static void config(java.lang.Object caller, java.lang.String methodName, java.lang.String msg)
          configs a message
static void entering(java.lang.Object caller, java.lang.String arg0, java.lang.String arg1)
          Logs a method entry.
static void entering(java.lang.Object caller, java.lang.String arg0, java.lang.String arg1, java.lang.Object arg2)
          Logs a method entry.
static void entering(java.lang.Object caller, java.lang.String arg0, java.lang.String arg1, java.lang.Object[] arg2)
          Logs a method entry.
static void exiting(java.lang.Object caller, java.lang.String arg0, java.lang.String arg1)
          Logs a method exit.
static void exiting(java.lang.Object caller, java.lang.String arg0, java.lang.String arg1, java.lang.Object arg2)
          Logs a method exit.
static void fine(java.lang.Object caller, java.lang.String methodName, java.lang.String msg)
          Logs a fine message
static void finer(java.lang.Object caller, java.lang.String methodName, java.lang.String msg)
          Logs a finer message
static void finest(java.lang.Object caller, java.lang.String methodName, java.lang.String msg)
          Logs a finest message
static java.lang.Class getDefaultHandler()
           
static java.lang.String[] getLoggerNames()
          returns the names of the currently used loggers
static java.util.logging.Level getLogLevel()
           
static void info(java.lang.Object caller, java.lang.String methodName, java.lang.String msg)
          Logs a info message
static void log(java.lang.Object caller, java.util.logging.Level arg0, java.lang.String arg1)
          Logs a message
static void log(java.lang.Object caller, java.util.logging.Level arg0, java.lang.String arg1, java.lang.Object arg2)
          Logs a message, with associated parameter
static void log(java.lang.Object caller, java.util.logging.Level arg0, java.lang.String arg1, java.lang.Object[] arg2)
          Logs a message, with associated parameters
static void log(java.lang.Object caller, java.util.logging.Level arg0, java.lang.String arg1, java.lang.Throwable arg2)
          Logs a message, with associated throwable
static void log(java.lang.Object caller, java.util.logging.LogRecord arg0)
          Logs a log record
static void logp(java.lang.Object caller, java.util.logging.Level arg0, java.lang.String arg1, java.lang.String arg2, java.lang.String arg3)
          Logs a message, with associated class information
static void logp(java.lang.Object caller, java.util.logging.Level arg0, java.lang.String arg1, java.lang.String arg2, java.lang.String arg3, java.lang.Object arg4)
          Logs a message, with associated parameter and class information
static void logp(java.lang.Object caller, java.util.logging.Level arg0, java.lang.String arg1, java.lang.String arg2, java.lang.String arg3, java.lang.Object[] arg4)
          Logs a message, with associated parameter and class information
static void logp(java.lang.Object caller, java.util.logging.Level arg0, java.lang.String arg1, java.lang.String arg2, java.lang.String arg3, java.lang.Throwable arg4)
          Logs a message, with associated throwable and class information
static void logrb(java.lang.Object caller, java.util.logging.Level arg0, java.lang.String arg1, java.lang.String arg2, java.lang.String arg3, java.lang.String arg4)
          Logs a message, with associated class information and resource bundle
static void logrb(java.lang.Object caller, java.util.logging.Level arg0, java.lang.String arg1, java.lang.String arg2, java.lang.String arg3, java.lang.String arg4, java.lang.Object arg5)
          Logs a message, with associated parameter and class information and resource bundle
static void logrb(java.lang.Object caller, java.util.logging.Level arg0, java.lang.String arg1, java.lang.String arg2, java.lang.String arg3, java.lang.String arg4, java.lang.Object[] arg5)
          Logs a message, with associated parameters and class information and resource bundle
static void logrb(java.lang.Object caller, java.util.logging.Level arg0, java.lang.String arg1, java.lang.String arg2, java.lang.String arg3, java.lang.String arg4, java.lang.Throwable arg5)
          Logs a message, with associated throwable and class information and resource bundle
static java.util.logging.Logger resolveLogger(java.lang.Object caller)
          resolves the logger for a caller
static void setDefaultHandler(java.lang.Class defaultHandler)
           
static void setLogLevel(java.util.logging.Level logLevel)
           
static void severe(java.lang.Object caller, java.lang.String methodName, java.lang.String msg)
          Logs a severe message
static void severe(java.lang.Object caller, java.lang.String methodName, java.lang.Throwable throwable)
          Logs a severe message
static void throwing(java.lang.Object caller, java.lang.String arg0, java.lang.String arg1, java.lang.Throwable arg2)
          logs a throwable message
static void warning(java.lang.Object caller, java.lang.String methodName, java.lang.String msg)
          Logs a warning message
static void warning(java.lang.Object caller, java.lang.String methodName, java.lang.Throwable thrown)
          Logs a warning message
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOGGERS

public static final nl.tudelft.simulation.event.util.EventProducingMap<java.lang.String,java.util.logging.Logger> LOGGERS
loggers are the currently available loggers

Method Detail

resolveLogger

public static java.util.logging.Logger resolveLogger(java.lang.Object caller)
resolves the logger for a caller

Parameters:
caller - the object invoking the loggers
Returns:
Logger the logger

config

public static void config(java.lang.Object caller,
                          java.lang.String methodName,
                          java.lang.String msg)
configs a message

Parameters:
caller - the caller
methodName - the name of the method
msg - the message

entering

public static void entering(java.lang.Object caller,
                            java.lang.String arg0,
                            java.lang.String arg1,
                            java.lang.Object arg2)
Logs a method entry.

Parameters:
caller - the object calling the logger
arg0 - the name of the class calling the method
arg1 - the name of the method entering
arg2 - parameter to the method being entered

entering

public static void entering(java.lang.Object caller,
                            java.lang.String arg0,
                            java.lang.String arg1,
                            java.lang.Object[] arg2)
Logs a method entry.

Parameters:
caller - the object calling the logger
arg0 - the name of the class calling the method
arg1 - the name of the method entering
arg2 - parameters to the method being entered

entering

public static void entering(java.lang.Object caller,
                            java.lang.String arg0,
                            java.lang.String arg1)
Logs a method entry.

Parameters:
caller - the object calling the logger
arg0 - the name of the class calling the method
arg1 - the name of the method entering

exiting

public static void exiting(java.lang.Object caller,
                           java.lang.String arg0,
                           java.lang.String arg1,
                           java.lang.Object arg2)
Logs a method exit.

Parameters:
caller - the object calling the logger
arg0 - the name of the class calling the method
arg1 - the name of the method entering
arg2 - result of the method

exiting

public static void exiting(java.lang.Object caller,
                           java.lang.String arg0,
                           java.lang.String arg1)
Logs a method exit.

Parameters:
caller - the object calling the logger
arg0 - the name of the class calling the method
arg1 - the name of the method entering

fine

public static void fine(java.lang.Object caller,
                        java.lang.String methodName,
                        java.lang.String msg)
Logs a fine message

Parameters:
caller - the object calling the logger
methodName - the name of the method
msg - the message

finer

public static void finer(java.lang.Object caller,
                         java.lang.String methodName,
                         java.lang.String msg)
Logs a finer message

Parameters:
caller - the object calling the logger
methodName - the name of the method
msg - the message

finest

public static void finest(java.lang.Object caller,
                          java.lang.String methodName,
                          java.lang.String msg)
Logs a finest message

Parameters:
caller - the object calling the logger
methodName - the name of the method
msg - the message

getLoggerNames

public static java.lang.String[] getLoggerNames()
returns the names of the currently used loggers

Returns:
String[] the names

info

public static void info(java.lang.Object caller,
                        java.lang.String methodName,
                        java.lang.String msg)
Logs a info message

Parameters:
caller - the object calling the logger
methodName - the name of the method
msg - the message

log

public static void log(java.lang.Object caller,
                       java.util.logging.Level arg0,
                       java.lang.String arg1,
                       java.lang.Object arg2)
Logs a message, with associated parameter

Parameters:
caller - the object calling the logger
arg0 - the log level
arg1 - the message
arg2 - the parameter

log

public static void log(java.lang.Object caller,
                       java.util.logging.Level arg0,
                       java.lang.String arg1,
                       java.lang.Object[] arg2)
Logs a message, with associated parameters

Parameters:
caller - the object calling the logger
arg0 - the log level
arg1 - the message
arg2 - the parameters

log

public static void log(java.lang.Object caller,
                       java.util.logging.Level arg0,
                       java.lang.String arg1,
                       java.lang.Throwable arg2)
Logs a message, with associated throwable

Parameters:
caller - the object calling the logger
arg0 - the log level
arg1 - the message
arg2 - the throwable

log

public static void log(java.lang.Object caller,
                       java.util.logging.Level arg0,
                       java.lang.String arg1)
Logs a message

Parameters:
caller - the object calling the logger
arg0 - the log level
arg1 - the message

log

public static void log(java.lang.Object caller,
                       java.util.logging.LogRecord arg0)
Logs a log record

Parameters:
caller - the object calling the logger
arg0 - the log record

logp

public static void logp(java.lang.Object caller,
                        java.util.logging.Level arg0,
                        java.lang.String arg1,
                        java.lang.String arg2,
                        java.lang.String arg3,
                        java.lang.Object arg4)
Logs a message, with associated parameter and class information

Parameters:
caller - the object calling the logger
arg0 - the log level
arg1 - the source class
arg2 - the method information
arg3 - the message
arg4 - the parameter

logp

public static void logp(java.lang.Object caller,
                        java.util.logging.Level arg0,
                        java.lang.String arg1,
                        java.lang.String arg2,
                        java.lang.String arg3,
                        java.lang.Object[] arg4)
Logs a message, with associated parameter and class information

Parameters:
caller - the object calling the logger
arg0 - the log level
arg1 - the source class
arg2 - the method information
arg3 - the message
arg4 - the parameters

logp

public static void logp(java.lang.Object caller,
                        java.util.logging.Level arg0,
                        java.lang.String arg1,
                        java.lang.String arg2,
                        java.lang.String arg3,
                        java.lang.Throwable arg4)
Logs a message, with associated throwable and class information

Parameters:
caller - the object calling the logger
arg0 - the log level
arg1 - the source class
arg2 - the method information
arg3 - the message
arg4 - the parameters

logp

public static void logp(java.lang.Object caller,
                        java.util.logging.Level arg0,
                        java.lang.String arg1,
                        java.lang.String arg2,
                        java.lang.String arg3)
Logs a message, with associated class information

Parameters:
caller - the object calling the logger
arg0 - the log level
arg1 - the source class
arg2 - the method information
arg3 - the message

logrb

public static void logrb(java.lang.Object caller,
                         java.util.logging.Level arg0,
                         java.lang.String arg1,
                         java.lang.String arg2,
                         java.lang.String arg3,
                         java.lang.String arg4,
                         java.lang.Object arg5)
Logs a message, with associated parameter and class information and resource bundle

Parameters:
caller - the object calling the logger
arg0 - the log level
arg1 - the source class
arg2 - the method information
arg3 - the resource bundle
arg4 - the message
arg5 - the parameter

logrb

public static void logrb(java.lang.Object caller,
                         java.util.logging.Level arg0,
                         java.lang.String arg1,
                         java.lang.String arg2,
                         java.lang.String arg3,
                         java.lang.String arg4,
                         java.lang.Object[] arg5)
Logs a message, with associated parameters and class information and resource bundle

Parameters:
caller - the object calling the logger
arg0 - the log level
arg1 - the source class
arg2 - the method information
arg3 - the resource bundle
arg4 - the message
arg5 - the parameters

logrb

public static void logrb(java.lang.Object caller,
                         java.util.logging.Level arg0,
                         java.lang.String arg1,
                         java.lang.String arg2,
                         java.lang.String arg3,
                         java.lang.String arg4,
                         java.lang.Throwable arg5)
Logs a message, with associated throwable and class information and resource bundle

Parameters:
caller - the object calling the logger
arg0 - the log level
arg1 - the source class
arg2 - the method information
arg3 - the resource bundle
arg4 - the message
arg5 - the parameters

logrb

public static void logrb(java.lang.Object caller,
                         java.util.logging.Level arg0,
                         java.lang.String arg1,
                         java.lang.String arg2,
                         java.lang.String arg3,
                         java.lang.String arg4)
Logs a message, with associated class information and resource bundle

Parameters:
caller - the object calling the logger
arg0 - the log level
arg1 - the source class
arg2 - the method information
arg3 - the resource bundle
arg4 - the message

severe

public static void severe(java.lang.Object caller,
                          java.lang.String methodName,
                          java.lang.String msg)
Logs a severe message

Parameters:
caller - the object calling the logger
methodName - the name of the method
msg - the message

severe

public static void severe(java.lang.Object caller,
                          java.lang.String methodName,
                          java.lang.Throwable throwable)
Logs a severe message

Parameters:
caller - the object calling the logger
methodName - the name of the method
throwable - the throwable

throwing

public static void throwing(java.lang.Object caller,
                            java.lang.String arg0,
                            java.lang.String arg1,
                            java.lang.Throwable arg2)
logs a throwable message

Parameters:
caller - the object invoking the logger
arg0 - the class
arg1 - the method
arg2 - the throwable

warning

public static void warning(java.lang.Object caller,
                           java.lang.String methodName,
                           java.lang.String msg)
Logs a warning message

Parameters:
caller - the object calling the logger
methodName - the name of the method
msg - the message

warning

public static void warning(java.lang.Object caller,
                           java.lang.String methodName,
                           java.lang.Throwable thrown)
Logs a warning message

Parameters:
caller - the object calling the logger
methodName - the name of the method
thrown - the thrown

getDefaultHandler

public static java.lang.Class getDefaultHandler()
Returns:
Returns the defaultHandler.

setDefaultHandler

public static void setDefaultHandler(java.lang.Class defaultHandler)
Parameters:
defaultHandler - The defaultHandler to set.

getLogLevel

public static java.util.logging.Level getLogLevel()
Returns:
Returns the logLevel.

setLogLevel

public static void setLogLevel(java.util.logging.Level logLevel)
Parameters:
logLevel - The logLevel to set.


Copyright © 2002-2005 Delft University of Technology, the Netherlands. All Rights Reserved.