Class CliLogger

  • All Implemented Interfaces:
    java.io.Serializable, org.apache.sshd.common.util.logging.SimplifiedLog, org.slf4j.Logger

    public class CliLogger
    extends org.apache.sshd.common.util.logging.SimplifiedLoggerSkeleton
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.text.DateFormat LOG_TIME_FORMATTER  
      protected java.io.PrintStream logStream  
      protected java.lang.String name  
      private static org.apache.sshd.common.util.io.output.NullPrintStream NULL_PRINT_STREAM  
      private static long serialVersionUID  
      protected java.util.logging.Level threshold  
      • Fields inherited from class org.apache.sshd.common.util.logging.SimplifiedLoggerSkeleton

        EMPTY
      • Fields inherited from interface org.slf4j.Logger

        ROOT_LOGGER_NAME
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected CliLogger​(java.lang.String name, java.util.logging.Level threshold, java.io.PrintStream logStream)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static org.slf4j.Logger getLogger​(java.lang.Class<?> clazz, java.util.logging.Level threshold, java.io.PrintStream logStream)  
      static org.slf4j.Logger getLogger​(java.lang.String name, java.util.logging.Level threshold, java.io.PrintStream logStream)  
      java.lang.String getName()  
      static org.slf4j.Logger getSystemLogger​(java.lang.Class<?> clazz, java.util.logging.Level threshold)  
      static org.slf4j.Logger getSystemLogger​(java.lang.String name, java.util.logging.Level threshold)  
      boolean isEnabledLevel​(java.util.logging.Level level)  
      static boolean isEnabledVerbosityLogging​(java.util.logging.Level level)  
      static void log​(java.io.PrintStream logStream, java.util.logging.Level level, java.lang.Object msg)  
      static void log​(java.io.PrintStream logStream, java.util.logging.Level level, java.lang.Object msg, java.lang.Throwable err)  
      void log​(java.util.logging.Level level, java.lang.Object msg, java.lang.Throwable err)  
      static <T extends java.lang.Throwable>
      T
      printStackTrace​(java.lang.Appendable out, T reason)  
      protected java.lang.Object readResolve()  
      static org.slf4j.Logger resolveLogger​(java.lang.Class<?> clazz, java.util.logging.Level threshold, java.io.PrintStream stdout, java.io.PrintStream stderr)  
      static org.slf4j.Logger resolveLogger​(java.lang.String name, java.util.logging.Level threshold, java.io.PrintStream stdout, java.io.PrintStream stderr)  
      static java.util.logging.Level resolveLoggingVerbosity​(java.lang.String... args)  
      static java.util.logging.Level resolveLoggingVerbosity​(java.lang.String[] args, int maxIndex)  
      static java.util.logging.Level resolveLoggingVerbosity​(org.apache.sshd.common.PropertyResolver resolver, java.lang.String... args)
      Looks for the ConfigFileReaderSupport.LOG_LEVEL_CONFIG_PROP in the options.
      static java.io.PrintStream resolvePrintStream​(java.util.logging.Level threshold, java.io.PrintStream stdout, java.io.PrintStream stderr)  
      static org.slf4j.Logger resolveSystemLogger​(java.lang.Class<?> clazz, java.util.logging.Level threshold)  
      static org.slf4j.Logger resolveSystemLogger​(java.lang.String name, java.util.logging.Level threshold)  
      static java.io.PrintStream resolveSystemPrintStream​(java.util.logging.Level threshold)  
      static boolean showError​(java.io.PrintStream stderr, java.lang.String message)  
      • Methods inherited from class org.apache.sshd.common.util.logging.SimplifiedLoggerSkeleton

        debug, error, info, isDebugEnabled, isErrorEnabled, isInfoEnabled, isTraceEnabled, isWarnEnabled, trace, warn
      • Methods inherited from class org.apache.sshd.common.util.logging.LoggerSkeleton

        debug, debug, debug, debug, error, error, error, error, info, info, info, info, trace, trace, trace, trace, warn, warn, warn, warn
      • Methods inherited from class org.slf4j.helpers.MarkerIgnoringBase

        debug, debug, debug, debug, debug, error, error, error, error, error, info, info, info, info, info, isDebugEnabled, isErrorEnabled, isInfoEnabled, isTraceEnabled, isWarnEnabled, toString, trace, trace, trace, trace, trace, warn, warn, warn, warn, warn
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface org.slf4j.Logger

        getName
      • Methods inherited from interface org.apache.sshd.common.util.logging.SimplifiedLog

        debug, error, info, log, trace, warn
    • Field Detail

      • LOG_TIME_FORMATTER

        public static final java.text.DateFormat LOG_TIME_FORMATTER
      • NULL_PRINT_STREAM

        private static final org.apache.sshd.common.util.io.output.NullPrintStream NULL_PRINT_STREAM
      • threshold

        protected final java.util.logging.Level threshold
      • logStream

        protected final java.io.PrintStream logStream
      • name

        protected java.lang.String name
    • Constructor Detail

      • CliLogger

        protected CliLogger​(java.lang.String name,
                            java.util.logging.Level threshold,
                            java.io.PrintStream logStream)
    • Method Detail

      • isEnabledLevel

        public boolean isEnabledLevel​(java.util.logging.Level level)
      • log

        public void log​(java.util.logging.Level level,
                        java.lang.Object msg,
                        java.lang.Throwable err)
      • log

        public static void log​(java.io.PrintStream logStream,
                               java.util.logging.Level level,
                               java.lang.Object msg)
      • log

        public static void log​(java.io.PrintStream logStream,
                               java.util.logging.Level level,
                               java.lang.Object msg,
                               java.lang.Throwable err)
      • resolveLoggingVerbosity

        public static java.util.logging.Level resolveLoggingVerbosity​(org.apache.sshd.common.PropertyResolver resolver,
                                                                      java.lang.String... args)
        Looks for the ConfigFileReaderSupport.LOG_LEVEL_CONFIG_PROP in the options. If found, then uses it as the result. Otherwise, invokes resolveLoggingVerbosity(String...)
        Parameters:
        resolver - The -o options specified by the user
        args - The command line arguments
        Returns:
        The resolved verbosity level
      • resolveLoggingVerbosity

        public static java.util.logging.Level resolveLoggingVerbosity​(java.lang.String... args)
      • resolveLoggingVerbosity

        public static java.util.logging.Level resolveLoggingVerbosity​(java.lang.String[] args,
                                                                      int maxIndex)
      • resolveSystemLogger

        public static org.slf4j.Logger resolveSystemLogger​(java.lang.Class<?> clazz,
                                                           java.util.logging.Level threshold)
      • resolveSystemLogger

        public static org.slf4j.Logger resolveSystemLogger​(java.lang.String name,
                                                           java.util.logging.Level threshold)
      • resolveLogger

        public static org.slf4j.Logger resolveLogger​(java.lang.Class<?> clazz,
                                                     java.util.logging.Level threshold,
                                                     java.io.PrintStream stdout,
                                                     java.io.PrintStream stderr)
      • resolveLogger

        public static org.slf4j.Logger resolveLogger​(java.lang.String name,
                                                     java.util.logging.Level threshold,
                                                     java.io.PrintStream stdout,
                                                     java.io.PrintStream stderr)
      • showError

        public static boolean showError​(java.io.PrintStream stderr,
                                        java.lang.String message)
      • isEnabledVerbosityLogging

        public static boolean isEnabledVerbosityLogging​(java.util.logging.Level level)
      • resolvePrintStream

        public static java.io.PrintStream resolvePrintStream​(java.util.logging.Level threshold,
                                                             java.io.PrintStream stdout,
                                                             java.io.PrintStream stderr)
      • printStackTrace

        public static <T extends java.lang.Throwable> T printStackTrace​(java.lang.Appendable out,
                                                                        T reason)
      • getSystemLogger

        public static org.slf4j.Logger getSystemLogger​(java.lang.Class<?> clazz,
                                                       java.util.logging.Level threshold)
      • getSystemLogger

        public static org.slf4j.Logger getSystemLogger​(java.lang.String name,
                                                       java.util.logging.Level threshold)
      • resolveSystemPrintStream

        public static java.io.PrintStream resolveSystemPrintStream​(java.util.logging.Level threshold)
      • getLogger

        public static org.slf4j.Logger getLogger​(java.lang.Class<?> clazz,
                                                 java.util.logging.Level threshold,
                                                 java.io.PrintStream logStream)
      • getLogger

        public static org.slf4j.Logger getLogger​(java.lang.String name,
                                                 java.util.logging.Level threshold,
                                                 java.io.PrintStream logStream)
      • getName

        public java.lang.String getName()
        Specified by:
        getName in interface org.slf4j.Logger
      • readResolve

        protected java.lang.Object readResolve()
                                        throws java.io.ObjectStreamException
        Throws:
        java.io.ObjectStreamException