org.apache.maven.cli.logging
Class Slf4jLogger

java.lang.Object
  extended by org.apache.maven.cli.logging.Slf4jLogger
All Implemented Interfaces:
Logger

public class Slf4jLogger
extends Object
implements Logger

Adapt an SLF4J logger to a Plexus logger, ignoring Plexus logger API parts that are not classical and probably not really used.

Author:
Jason van Zyl

Field Summary
 
Fields inherited from interface org.codehaus.plexus.logging.Logger
LEVEL_DEBUG, LEVEL_DISABLED, LEVEL_ERROR, LEVEL_FATAL, LEVEL_INFO, LEVEL_WARN
 
Constructor Summary
Slf4jLogger(org.slf4j.Logger logger)
           
 
Method Summary
 void debug(String message)
           
 void debug(String message, Throwable throwable)
           
 void error(String message)
           
 void error(String message, Throwable throwable)
           
 void fatalError(String message)
           
 void fatalError(String message, Throwable throwable)
           
 Logger getChildLogger(String name)
          Warning: ignored (always return null).
 String getName()
           
 int getThreshold()
          Warning: ignored (always return 0 == Logger.LEVEL_DEBUG).
 void info(String message)
           
 void info(String message, Throwable throwable)
           
 boolean isDebugEnabled()
           
 boolean isErrorEnabled()
           
 boolean isFatalErrorEnabled()
           
 boolean isInfoEnabled()
           
 boolean isWarnEnabled()
           
 void setThreshold(int threshold)
          Warning: ignored.
 void warn(String message)
           
 void warn(String message, Throwable throwable)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Slf4jLogger

public Slf4jLogger(org.slf4j.Logger logger)
Method Detail

debug

public void debug(String message)
Specified by:
debug in interface Logger

debug

public void debug(String message,
                  Throwable throwable)
Specified by:
debug in interface Logger

isDebugEnabled

public boolean isDebugEnabled()
Specified by:
isDebugEnabled in interface Logger

info

public void info(String message)
Specified by:
info in interface Logger

info

public void info(String message,
                 Throwable throwable)
Specified by:
info in interface Logger

isInfoEnabled

public boolean isInfoEnabled()
Specified by:
isInfoEnabled in interface Logger

warn

public void warn(String message)
Specified by:
warn in interface Logger

warn

public void warn(String message,
                 Throwable throwable)
Specified by:
warn in interface Logger

isWarnEnabled

public boolean isWarnEnabled()
Specified by:
isWarnEnabled in interface Logger

error

public void error(String message)
Specified by:
error in interface Logger

error

public void error(String message,
                  Throwable throwable)
Specified by:
error in interface Logger

isErrorEnabled

public boolean isErrorEnabled()
Specified by:
isErrorEnabled in interface Logger

fatalError

public void fatalError(String message)
Specified by:
fatalError in interface Logger

fatalError

public void fatalError(String message,
                       Throwable throwable)
Specified by:
fatalError in interface Logger

isFatalErrorEnabled

public boolean isFatalErrorEnabled()
Specified by:
isFatalErrorEnabled in interface Logger

getThreshold

public int getThreshold()
Warning: ignored (always return 0 == Logger.LEVEL_DEBUG).

Specified by:
getThreshold in interface Logger

setThreshold

public void setThreshold(int threshold)
Warning: ignored.

Specified by:
setThreshold in interface Logger

getChildLogger

public Logger getChildLogger(String name)
Warning: ignored (always return null).

Specified by:
getChildLogger in interface Logger

getName

public String getName()
Specified by:
getName in interface Logger


Copyright © 2001–2013 The Apache Software Foundation. All rights reserved.