Class SilentLog

  • All Implemented Interfaces:
    org.apache.maven.plugin.logging.Log, org.codehaus.plexus.logging.Logger

    public class SilentLog
    extends java.lang.Object
    implements org.apache.maven.plugin.logging.Log, org.codehaus.plexus.logging.Logger
    This logger implements both types of logs currently in use. It can be injected where needed to turn off logs during testing where they aren't desired.
    Version:
    $Id$
    • 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

      Constructors 
      Constructor Description
      SilentLog()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void debug​(java.lang.CharSequence content)
      By default, do nothing.
      void debug​(java.lang.CharSequence content, java.lang.Throwable error)
      By default, do nothing.
      void debug​(java.lang.String message)
      By default, do nothing.
      void debug​(java.lang.String message, java.lang.Throwable throwable)
      By default, do nothing.
      void debug​(java.lang.Throwable error)
      By default, do nothing.
      void error​(java.lang.CharSequence content)
      By default, do nothing.
      void error​(java.lang.CharSequence content, java.lang.Throwable error)
      By default, do nothing.
      void error​(java.lang.String message)
      By default, do nothing.
      void error​(java.lang.String message, java.lang.Throwable throwable)
      By default, do nothing.
      void error​(java.lang.Throwable error)
      By default, do nothing.
      void fatalError​(java.lang.String message)
      By default, do nothing.
      void fatalError​(java.lang.String message, java.lang.Throwable throwable)
      By default, do nothing.
      org.codehaus.plexus.logging.Logger getChildLogger​(java.lang.String name)  
      java.lang.String getName()  
      int getThreshold()  
      void info​(java.lang.CharSequence content)
      By default, do nothing.
      void info​(java.lang.CharSequence content, java.lang.Throwable error)
      By default, do nothing.
      void info​(java.lang.String message)
      By default, do nothing.
      void info​(java.lang.String message, java.lang.Throwable throwable)
      By default, do nothing.
      void info​(java.lang.Throwable error)
      By default, do nothing.
      boolean isDebugEnabled()  
      boolean isErrorEnabled()  
      boolean isFatalErrorEnabled()  
      boolean isInfoEnabled()  
      boolean isWarnEnabled()
      By default, do nothing.
      void setThreshold​(int threshold)  
      void warn​(java.lang.CharSequence content)
      By default, do nothing.
      void warn​(java.lang.CharSequence content, java.lang.Throwable error)
      By default, do nothing.
      void warn​(java.lang.String message)
      By default, do nothing.
      void warn​(java.lang.String message, java.lang.Throwable throwable)
      By default, do nothing.
      void warn​(java.lang.Throwable error)
      By default, do nothing.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SilentLog

        public SilentLog()
    • Method Detail

      • isDebugEnabled

        public boolean isDebugEnabled()
        Specified by:
        isDebugEnabled in interface org.apache.maven.plugin.logging.Log
        Specified by:
        isDebugEnabled in interface org.codehaus.plexus.logging.Logger
        Returns:
        false
        See Also:
        Log.isDebugEnabled()
      • debug

        public void debug​(java.lang.CharSequence content)
        By default, do nothing.
        Specified by:
        debug in interface org.apache.maven.plugin.logging.Log
        See Also:
        Log.debug(java.lang.CharSequence)
      • debug

        public void debug​(java.lang.CharSequence content,
                          java.lang.Throwable error)
        By default, do nothing.
        Specified by:
        debug in interface org.apache.maven.plugin.logging.Log
        See Also:
        Log.debug(java.lang.CharSequence, java.lang.Throwable)
      • debug

        public void debug​(java.lang.Throwable error)
        By default, do nothing.
        Specified by:
        debug in interface org.apache.maven.plugin.logging.Log
        See Also:
        Log.debug(java.lang.Throwable)
      • isInfoEnabled

        public boolean isInfoEnabled()
        Specified by:
        isInfoEnabled in interface org.apache.maven.plugin.logging.Log
        Specified by:
        isInfoEnabled in interface org.codehaus.plexus.logging.Logger
        Returns:
        false
        See Also:
        Log.isInfoEnabled()
      • info

        public void info​(java.lang.CharSequence content)
        By default, do nothing.
        Specified by:
        info in interface org.apache.maven.plugin.logging.Log
        See Also:
        Log.info(java.lang.CharSequence)
      • info

        public void info​(java.lang.CharSequence content,
                         java.lang.Throwable error)
        By default, do nothing.
        Specified by:
        info in interface org.apache.maven.plugin.logging.Log
        See Also:
        Log.info(java.lang.CharSequence, java.lang.Throwable)
      • info

        public void info​(java.lang.Throwable error)
        By default, do nothing.
        Specified by:
        info in interface org.apache.maven.plugin.logging.Log
        See Also:
        Log.info(java.lang.Throwable)
      • isWarnEnabled

        public boolean isWarnEnabled()
        By default, do nothing.
        Specified by:
        isWarnEnabled in interface org.apache.maven.plugin.logging.Log
        Specified by:
        isWarnEnabled in interface org.codehaus.plexus.logging.Logger
        See Also:
        Log.isWarnEnabled()
      • warn

        public void warn​(java.lang.CharSequence content)
        By default, do nothing.
        Specified by:
        warn in interface org.apache.maven.plugin.logging.Log
        See Also:
        Log.warn(java.lang.CharSequence)
      • warn

        public void warn​(java.lang.CharSequence content,
                         java.lang.Throwable error)
        By default, do nothing.
        Specified by:
        warn in interface org.apache.maven.plugin.logging.Log
        See Also:
        Log.warn(java.lang.CharSequence, java.lang.Throwable)
      • warn

        public void warn​(java.lang.Throwable error)
        By default, do nothing.
        Specified by:
        warn in interface org.apache.maven.plugin.logging.Log
        See Also:
        Log.warn(java.lang.Throwable)
      • isErrorEnabled

        public boolean isErrorEnabled()
        Specified by:
        isErrorEnabled in interface org.apache.maven.plugin.logging.Log
        Specified by:
        isErrorEnabled in interface org.codehaus.plexus.logging.Logger
        Returns:
        false
        See Also:
        Log.isErrorEnabled()
      • error

        public void error​(java.lang.CharSequence content)
        By default, do nothing.
        Specified by:
        error in interface org.apache.maven.plugin.logging.Log
        See Also:
        Log.error(java.lang.CharSequence)
      • error

        public void error​(java.lang.CharSequence content,
                          java.lang.Throwable error)
        By default, do nothing.
        Specified by:
        error in interface org.apache.maven.plugin.logging.Log
        See Also:
        Log.error(java.lang.CharSequence, java.lang.Throwable)
      • error

        public void error​(java.lang.Throwable error)
        By default, do nothing.
        Specified by:
        error in interface org.apache.maven.plugin.logging.Log
        See Also:
        Log.error(java.lang.Throwable)
      • debug

        public void debug​(java.lang.String message)
        By default, do nothing.
        Specified by:
        debug in interface org.codehaus.plexus.logging.Logger
        See Also:
        Logger.debug(java.lang.String)
      • debug

        public void debug​(java.lang.String message,
                          java.lang.Throwable throwable)
        By default, do nothing.
        Specified by:
        debug in interface org.codehaus.plexus.logging.Logger
        See Also:
        Logger.debug(java.lang.String, java.lang.Throwable)
      • info

        public void info​(java.lang.String message)
        By default, do nothing.
        Specified by:
        info in interface org.codehaus.plexus.logging.Logger
        See Also:
        Logger.info(java.lang.String)
      • info

        public void info​(java.lang.String message,
                         java.lang.Throwable throwable)
        By default, do nothing.
        Specified by:
        info in interface org.codehaus.plexus.logging.Logger
        See Also:
        Logger.info(java.lang.String, java.lang.Throwable)
      • warn

        public void warn​(java.lang.String message)
        By default, do nothing.
        Specified by:
        warn in interface org.codehaus.plexus.logging.Logger
        See Also:
        Logger.warn(java.lang.String)
      • warn

        public void warn​(java.lang.String message,
                         java.lang.Throwable throwable)
        By default, do nothing.
        Specified by:
        warn in interface org.codehaus.plexus.logging.Logger
        See Also:
        Logger.warn(java.lang.String, java.lang.Throwable)
      • error

        public void error​(java.lang.String message)
        By default, do nothing.
        Specified by:
        error in interface org.codehaus.plexus.logging.Logger
        See Also:
        Logger.error(java.lang.String)
      • error

        public void error​(java.lang.String message,
                          java.lang.Throwable throwable)
        By default, do nothing.
        Specified by:
        error in interface org.codehaus.plexus.logging.Logger
        See Also:
        Logger.error(java.lang.String, java.lang.Throwable)
      • fatalError

        public void fatalError​(java.lang.String message)
        By default, do nothing.
        Specified by:
        fatalError in interface org.codehaus.plexus.logging.Logger
        See Also:
        Logger.fatalError(java.lang.String)
      • fatalError

        public void fatalError​(java.lang.String message,
                               java.lang.Throwable throwable)
        By default, do nothing.
        Specified by:
        fatalError in interface org.codehaus.plexus.logging.Logger
        See Also:
        Logger.fatalError(java.lang.String, java.lang.Throwable)
      • isFatalErrorEnabled

        public boolean isFatalErrorEnabled()
        Specified by:
        isFatalErrorEnabled in interface org.codehaus.plexus.logging.Logger
        Returns:
        false
        See Also:
        Logger.isFatalErrorEnabled()
      • getChildLogger

        public org.codehaus.plexus.logging.Logger getChildLogger​(java.lang.String name)
        Specified by:
        getChildLogger in interface org.codehaus.plexus.logging.Logger
        Returns:
        null
        See Also:
        Logger.getChildLogger(java.lang.String)
      • getThreshold

        public int getThreshold()
        Specified by:
        getThreshold in interface org.codehaus.plexus.logging.Logger
        Returns:
        0
        See Also:
        Logger.getThreshold()
      • getName

        public java.lang.String getName()
        Specified by:
        getName in interface org.codehaus.plexus.logging.Logger
        Returns:
        null
        See Also:
        Logger.getName()
      • setThreshold

        public void setThreshold​(int threshold)
        Specified by:
        setThreshold in interface org.codehaus.plexus.logging.Logger