XNIO version 1.1.0.GA

org.jboss.xnio.log
Class Logger

java.lang.Object
  extended by org.jboss.xnio.log.Logger

public final class Logger
extends Object

A logger that may be used by XNIO applications.


Field Summary
static Level DEBUG
          The DEBUG log level.
static Level ERROR
          The ERROR log level.
static Level INFO
          The INFO log level.
static Level TRACE
          The TRACE log level.
static Level WARN
          The WARN log level.
 
Method Summary
 void debug(String msg)
          Log a message at debug level.
 void debug(String msg, Object... params)
          Log a message at debug level.
 void debug(Throwable ex, String msg, Object... params)
          Log a message at debug level with an exception.
 void error(String msg)
          Log a message at error level.
 void error(String msg, Object... params)
          Log a message at error level.
 void error(Throwable ex, String msg, Object... params)
          Log a message at error level with an exception.
static Logger getLogger(Class claxx)
          Get a logger whose name is the same as the fully qualified name of the given class.
static Logger getLogger(String name)
          Get a logger with the given name.
 void info(String msg)
          Log a message at info level.
 void info(String msg, Object... params)
          Log a message at info level.
 void info(Throwable ex, String msg, Object... params)
          Log a message at info level with an exception.
 boolean isTrace()
          Test to see if the logger would log trace messages.
 void trace(String msg)
          Log a message at trace level.
 void trace(String msg, Object... params)
          Log a message at trace level.
 void trace(Throwable ex, String msg, Object... params)
          Log a message at trace level with an exception.
 void warn(String msg)
          Log a message at warn level.
 void warn(String msg, Object... params)
          Log a message at warn level.
 void warn(Throwable ex, String msg, Object... params)
          Log a message at warn level with an exception.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TRACE

public static final Level TRACE
The TRACE log level.


DEBUG

public static final Level DEBUG
The DEBUG log level.


INFO

public static final Level INFO
The INFO log level.


WARN

public static final Level WARN
The WARN log level.


ERROR

public static final Level ERROR
The ERROR log level.

Method Detail

getLogger

public static Logger getLogger(String name)
Get a logger with the given name.

Parameters:
name - the logger name
Returns:
the matching logger

getLogger

public static Logger getLogger(Class claxx)
Get a logger whose name is the same as the fully qualified name of the given class.

Parameters:
claxx - the class name
Returns:
the matching logger

isTrace

public boolean isTrace()
Test to see if the logger would log trace messages.

Returns:
true if trace messages may be logged

error

public void error(String msg)
Log a message at error level.

Parameters:
msg - the message to log

error

public void error(Throwable ex,
                  String msg,
                  Object... params)
Log a message at error level with an exception. The message will be formatted using String.format(String, Object[]).

Parameters:
ex - the exception to log
msg - the message to log
params - the message parameters

error

public void error(String msg,
                  Object... params)
Log a message at error level. The message will be formatted using String.format(String, Object[]).

Parameters:
msg - the message to log
params - the message parameters

warn

public void warn(String msg)
Log a message at warn level.

Parameters:
msg - the message to log

warn

public void warn(Throwable ex,
                 String msg,
                 Object... params)
Log a message at warn level with an exception. The message will be formatted using String.format(String, Object[]).

Parameters:
ex - the exception to log
msg - the message to log
params - the message parameters

warn

public void warn(String msg,
                 Object... params)
Log a message at warn level. The message will be formatted using String.format(String, Object[]).

Parameters:
msg - the message to log
params - the message parameters

info

public void info(String msg)
Log a message at info level.

Parameters:
msg - the message to log

info

public void info(Throwable ex,
                 String msg,
                 Object... params)
Log a message at info level with an exception. The message will be formatted using String.format(String, Object[]).

Parameters:
ex - the exception to log
msg - the message to log
params - the message parameters

info

public void info(String msg,
                 Object... params)
Log a message at info level. The message will be formatted using String.format(String, Object[]).

Parameters:
msg - the message to log
params - the message parameters

debug

public void debug(String msg)
Log a message at debug level.

Parameters:
msg - the message to log

debug

public void debug(Throwable ex,
                  String msg,
                  Object... params)
Log a message at debug level with an exception. The message will be formatted using String.format(String, Object[]).

Parameters:
ex - the exception to log
msg - the message to log
params - the message parameters

debug

public void debug(String msg,
                  Object... params)
Log a message at debug level. The message will be formatted using String.format(String, Object[]).

Parameters:
msg - the message to log
params - the message parameters

trace

public void trace(String msg)
Log a message at trace level.

Parameters:
msg - the message to log

trace

public void trace(Throwable ex,
                  String msg,
                  Object... params)
Log a message at trace level with an exception. The message will be formatted using String.format(String, Object[]).

Parameters:
ex - the exception to log
msg - the message to log
params - the message parameters

trace

public void trace(String msg,
                  Object... params)
Log a message at trace level. The message will be formatted using String.format(String, Object[]).

Parameters:
msg - the message to log
params - the message parameters

XNIO version 1.1.0.GA

Copyright © 2008 JBoss, a division of Red Hat, Inc.