Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jboss.logging
Class Logger

    java.lang.Object
      |
      +--org.jboss.logging.Logger

public class Logger
extends java.lang.Object

A custom log4j Category wrapper that adds a trace level priority and only exposes the relevent factory and logging methods.

Version:
  $Revision: 1.8.4.1 $
Author:
  Scott.Stark@jboss.org
See Also:
  `isTraceEnabled()`, `trace(Object message)`, `trace(Object, Throwable)`

Constructor Summary
`protected` | `Logger(java.lang.String name)` Creates new JBossCategory with the given category name.

Method Summary
`void` | `debug(java.lang.Object message)` Issue a log msg with a priority of DEBUG.
`void` | `debug(java.lang.Object message, java.lang.Throwable t)` Issue a log msg and throwable with a priority of DEBUG.
`void` | `error(java.lang.Object message)` Issue a log msg with a priority of ERROR.
`void` | `error(java.lang.Object message, java.lang.Throwable t)` Issue a log msg and throwable with a priority of ERROR.
`void` | `fatal(java.lang.Object message)` Issue a log msg with a priority of FATAL.
`void` | `fatal(java.lang.Object message, java.lang.Throwable t)` Issue a log msg and throwable with a priority of FATAL.
`org.apache.log4j.Category` | `getCategory()`
`static Logger` | `getLogger(java.lang.Class clazz)` Create a Logger instance given the category class.
`static Logger` | `getLogger(java.lang.String name)` Create a Logger instance given the category name.
`void` | `info(java.lang.Object message)` Issue a log msg with a priority of INFO.
`void` | `info(java.lang.Object message, java.lang.Throwable t)` Issue a log msg and throwable with a priority of INFO.
`boolean` | `isDebugEnabled()` Check to see if the TRACE priority is enabled for this category.
`boolean` | `isInfoEnabled()` Check to see if the INFO priority is enabled for this category.
`boolean` | `isTraceEnabled()` Check to see if the TRACE priority is enabled for this category.
`void` | `log(org.apache.log4j.Priority p, java.lang.Object message)` Issue a log msg with the given priority.
`void` | `log(org.apache.log4j.Priority p, java.lang.Object message, java.lang.Throwable t)` Issue a log msg with the given priority.
`void` | `trace(java.lang.Object message)` Issue a log msg with a priority of TRACE.
`void` | `trace(java.lang.Object message, java.lang.Throwable t)` Issue a log msg and throwable with a priority of TRACE.
`void` | `warn(java.lang.Object message)` Issue a log msg with a priority of WARN.
`void` | `warn(java.lang.Object message, java.lang.Throwable t)` Issue a log msg and throwable with a priority of WARN.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### Logger

    protected Logger(java.lang.String name)

  Creates new JBossCategory with the given category name.
  Parameters:
    `name,` - the category name.

Method Detail

### getLogger

    public static Logger getLogger(java.lang.String name)

  Create a Logger instance given the category name.
  Parameters:
    `name,` - the category name

### getLogger

    public static Logger getLogger(java.lang.Class clazz)

  Create a Logger instance given the category class. This simply calls create(clazz.getName()).
  Parameters:
    `clazz,` - the Class whose name will be used as the category name

### getCategory

    public org.apache.log4j.Category getCategory()

### isTraceEnabled

    public boolean isTraceEnabled()

  Check to see if the TRACE priority is enabled for this category.
  Returns:
    true if a `#trace(String)` method invocation would pass the msg to the configured appenders, false otherwise.

### trace

    public void trace(java.lang.Object message)

  Issue a log msg with a priority of TRACE. Invokes log.log(TracePriority.TRACE, message);

### trace

    public void trace(java.lang.Object message,
                      java.lang.Throwable t)

  Issue a log msg and throwable with a priority of TRACE. Invokes log.log(TracePriority.TRACE, message, t);

### isDebugEnabled

    public boolean isDebugEnabled()

  Check to see if the TRACE priority is enabled for this category.
  Returns:
    true if a `#trace(String)` method invocation would pass the msg to the configured appenders, false otherwise.

### debug

    public void debug(java.lang.Object message)

  Issue a log msg with a priority of DEBUG. Invokes log.log(Priority.DEBUG, message);

### debug

    public void debug(java.lang.Object message,
                      java.lang.Throwable t)

  Issue a log msg and throwable with a priority of DEBUG. Invokes log.log(Priority.DEBUG, message, t);

### isInfoEnabled

    public boolean isInfoEnabled()

  Check to see if the INFO priority is enabled for this category.
  Returns:
    true if a `#info(String)` method invocation would pass the msg to the configured appenders, false otherwise.

### info

    public void info(java.lang.Object message)

  Issue a log msg with a priority of INFO. Invokes log.log(Priority.INFO, message);

### info

    public void info(java.lang.Object message,
                     java.lang.Throwable t)

  Issue a log msg and throwable with a priority of INFO. Invokes log.log(Priority.INFO, message, t);

### warn

    public void warn(java.lang.Object message)

  Issue a log msg with a priority of WARN. Invokes log.log(Priority.WARN, message);

### warn

    public void warn(java.lang.Object message,
                     java.lang.Throwable t)

  Issue a log msg and throwable with a priority of WARN. Invokes log.log(Priority.WARN, message, t);

### error

    public void error(java.lang.Object message)

  Issue a log msg with a priority of ERROR. Invokes log.log(Priority.ERROR, message);

### error

    public void error(java.lang.Object message,
                      java.lang.Throwable t)

  Issue a log msg and throwable with a priority of ERROR. Invokes log.log(Priority.ERROR, message, t);

### fatal

    public void fatal(java.lang.Object message)

  Issue a log msg with a priority of FATAL. Invokes log.log(Priority.FATAL, message);

### fatal

    public void fatal(java.lang.Object message,
                      java.lang.Throwable t)

  Issue a log msg and throwable with a priority of FATAL. Invokes log.log(Priority.FATAL, message, t);

### log

    public void log(org.apache.log4j.Priority p,
                    java.lang.Object message)

  Issue a log msg with the given priority. Invokes log.log(p, message);

### log

    public void log(org.apache.log4j.Priority p,
                    java.lang.Object message,
                    java.lang.Throwable t)

  Issue a log msg with the given priority. Invokes log.log(p, message, t);

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000 The JBoss Organization. All Rights Reserved.