Asterisk-Java

org.asteriskjava.util.internal
Class Slf4JLogger

java.lang.Object
  extended by org.asteriskjava.util.internal.Slf4JLogger
All Implemented Interfaces:
java.io.Serializable, Log

public class Slf4JLogger
extends java.lang.Object
implements Log, java.io.Serializable

Implementation of Log that maps to a SLF4J Logger.

Version:
$Id: Slf4JLogger.java 1373 2009-10-16 23:46:14Z srt $
See Also:
Serialized Form

Constructor Summary
Slf4JLogger()
           
Slf4JLogger(java.lang.Class clazz)
          Base constructor.
 
Method Summary
 void debug(java.lang.Object message)
          Log a message to the SLF4J Logger with DEBUG priority.
 void debug(java.lang.Object message, java.lang.Throwable t)
          Log an error to the SLF4J Logger with DEBUG priority.
 void error(java.lang.Object message)
          Log a message to the SLF4J Logger with ERROR priority.
 void error(java.lang.Object message, java.lang.Throwable t)
          Log an error to the SLF4J Logger with ERROR priority.
 void fatal(java.lang.Object message)
          Log a message to the SLF4J Logger with FATAL priority.
 void fatal(java.lang.Object message, java.lang.Throwable t)
          Log an error to the SLF4J Logger with FATAL priority.
 org.slf4j.Logger getLogger()
          Return the native Logger instance we are using.
 void info(java.lang.Object message)
          Log a message to the SLF4J Logger with INFO priority.
 void info(java.lang.Object message, java.lang.Throwable t)
          Log an error to the SLF4J Logger with INFO priority.
 boolean isDebugEnabled()
          Check whether the SLF4J Logger used is enabled for DEBUG priority.
 boolean isErrorEnabled()
          Check whether the SLF4J Logger used is enabled for ERROR priority.
 boolean isFatalEnabled()
          Check whether the SLF4J Logger used is enabled for FATAL priority.
 boolean isInfoEnabled()
          Check whether the SLF4J Logger used is enabled for INFO priority.
 boolean isTraceEnabled()
          Check whether the SLF4J Logger used is enabled for TRACE priority.
 boolean isWarnEnabled()
          Check whether the SLF4J Logger used is enabled for WARN priority.
 void trace(java.lang.Object message)
          Log a message to the SLF4J Logger with TRACE priority.
 void trace(java.lang.Object message, java.lang.Throwable t)
          Log an error to the SLF4J Logger with TRACE priority.
 void warn(java.lang.Object message)
          Log a message to the SLF4J Logger with WARN priority.
 void warn(java.lang.Object message, java.lang.Throwable t)
          Log an error to the SLF4J Logger with WARN priority.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Slf4JLogger

public Slf4JLogger()

Slf4JLogger

public Slf4JLogger(java.lang.Class clazz)
Base constructor.

Method Detail

trace

public void trace(java.lang.Object message)
Log a message to the SLF4J Logger with TRACE priority. Currently logs to DEBUG level in SLF4J.


trace

public void trace(java.lang.Object message,
                  java.lang.Throwable t)
Log an error to the SLF4J Logger with TRACE priority.


debug

public void debug(java.lang.Object message)
Log a message to the SLF4J Logger with DEBUG priority.

Specified by:
debug in interface Log

debug

public void debug(java.lang.Object message,
                  java.lang.Throwable t)
Log an error to the SLF4J Logger with DEBUG priority.


info

public void info(java.lang.Object message)
Log a message to the SLF4J Logger with INFO priority.

Specified by:
info in interface Log

info

public void info(java.lang.Object message,
                 java.lang.Throwable t)
Log an error to the SLF4J Logger with INFO priority.


warn

public void warn(java.lang.Object message)
Log a message to the SLF4J Logger with WARN priority.

Specified by:
warn in interface Log

warn

public void warn(java.lang.Object message,
                 java.lang.Throwable t)
Log an error to the SLF4J Logger with WARN priority.

Specified by:
warn in interface Log

error

public void error(java.lang.Object message)
Log a message to the SLF4J Logger with ERROR priority.

Specified by:
error in interface Log

error

public void error(java.lang.Object message,
                  java.lang.Throwable t)
Log an error to the SLF4J Logger with ERROR priority.

Specified by:
error in interface Log

fatal

public void fatal(java.lang.Object message)
Log a message to the SLF4J Logger with FATAL priority.

Currently uses the ERROR priority in SLF4J.


fatal

public void fatal(java.lang.Object message,
                  java.lang.Throwable t)
Log an error to the SLF4J Logger with FATAL priority.

Currently uses the ERROR priority in SLF4J.


getLogger

public final org.slf4j.Logger getLogger()
Return the native Logger instance we are using.


isDebugEnabled

public boolean isDebugEnabled()
Check whether the SLF4J Logger used is enabled for DEBUG priority.


isErrorEnabled

public boolean isErrorEnabled()
Check whether the SLF4J Logger used is enabled for ERROR priority.


isFatalEnabled

public boolean isFatalEnabled()
Check whether the SLF4J Logger used is enabled for FATAL priority. For SLF4J, this returns the value of isErrorEnabled()


isInfoEnabled

public boolean isInfoEnabled()
Check whether the SLF4J Logger used is enabled for INFO priority.


isTraceEnabled

public boolean isTraceEnabled()
Check whether the SLF4J Logger used is enabled for TRACE priority.


isWarnEnabled

public boolean isWarnEnabled()
Check whether the SLF4J Logger used is enabled for WARN priority.


Asterisk-Java

Copyright © 2004-2009 Stefan Reuter. All Rights Reserved.