Class CliLogger

java.lang.Object
org.slf4j.helpers.MarkerIgnoringBase
org.apache.sshd.common.util.logging.LoggerSkeleton
org.apache.sshd.common.util.logging.SimplifiedLoggerSkeleton
org.apache.sshd.cli.CliLogger
All Implemented Interfaces:
Serializable, org.apache.sshd.common.util.logging.SimplifiedLog, org.slf4j.Logger

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

    • LOG_TIME_FORMATTER

      public static final DateFormat LOG_TIME_FORMATTER
    • serialVersionUID

      private static final long serialVersionUID
      See Also:
    • NULL_PRINT_STREAM

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

      protected final Level threshold
    • logStream

      protected final PrintStream logStream
    • name

      protected String name
  • Constructor Details

  • Method Details

    • isEnabledLevel

      public boolean isEnabledLevel(Level level)
    • log

      public void log(Level level, Object msg, Throwable err)
    • log

      public static void log(PrintStream logStream, Level level, Object msg)
    • log

      public static void log(PrintStream logStream, Level level, Object msg, Throwable err)
    • resolveLoggingVerbosity

      public static Level resolveLoggingVerbosity(org.apache.sshd.common.PropertyResolver resolver, 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 Level resolveLoggingVerbosity(String... args)
    • resolveLoggingVerbosity

      public static Level resolveLoggingVerbosity(String[] args, int maxIndex)
    • resolveSystemLogger

      public static org.slf4j.Logger resolveSystemLogger(Class<?> clazz, Level threshold)
    • resolveSystemLogger

      public static org.slf4j.Logger resolveSystemLogger(String name, Level threshold)
    • resolveLogger

      public static org.slf4j.Logger resolveLogger(Class<?> clazz, Level threshold, PrintStream stdout, PrintStream stderr)
    • resolveLogger

      public static org.slf4j.Logger resolveLogger(String name, Level threshold, PrintStream stdout, PrintStream stderr)
    • showError

      public static boolean showError(PrintStream stderr, String message)
    • isEnabledVerbosityLogging

      public static boolean isEnabledVerbosityLogging(Level level)
    • resolvePrintStream

      public static PrintStream resolvePrintStream(Level threshold, PrintStream stdout, PrintStream stderr)
    • printStackTrace

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

      public static org.slf4j.Logger getSystemLogger(Class<?> clazz, Level threshold)
    • getSystemLogger

      public static org.slf4j.Logger getSystemLogger(String name, Level threshold)
    • resolveSystemPrintStream

      public static PrintStream resolveSystemPrintStream(Level threshold)
    • getLogger

      public static org.slf4j.Logger getLogger(Class<?> clazz, Level threshold, PrintStream logStream)
    • getLogger

      public static org.slf4j.Logger getLogger(String name, Level threshold, PrintStream logStream)
    • getName

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

      protected Object readResolve() throws ObjectStreamException
      Throws:
      ObjectStreamException