Package org.apache.sshd.cli
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 Summary
FieldsModifier and TypeFieldDescriptionstatic final DateFormat
protected final PrintStream
protected String
private static final org.apache.sshd.common.util.io.output.NullPrintStream
private static final long
protected final Level
Fields inherited from class org.apache.sshd.common.util.logging.SimplifiedLoggerSkeleton
EMPTY
Fields inherited from interface org.slf4j.Logger
ROOT_LOGGER_NAME
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
CliLogger
(String name, Level threshold, PrintStream logStream) -
Method Summary
Modifier and TypeMethodDescriptionstatic org.slf4j.Logger
getLogger
(Class<?> clazz, Level threshold, PrintStream logStream) static org.slf4j.Logger
getLogger
(String name, Level threshold, PrintStream logStream) getName()
static org.slf4j.Logger
getSystemLogger
(Class<?> clazz, Level threshold) static org.slf4j.Logger
getSystemLogger
(String name, Level threshold) boolean
isEnabledLevel
(Level level) static boolean
isEnabledVerbosityLogging
(Level level) static void
log
(PrintStream logStream, Level level, Object msg) static void
log
(PrintStream logStream, Level level, Object msg, Throwable err) void
static <T extends Throwable>
TprintStackTrace
(Appendable out, T reason) protected Object
static org.slf4j.Logger
resolveLogger
(Class<?> clazz, Level threshold, PrintStream stdout, PrintStream stderr) static org.slf4j.Logger
resolveLogger
(String name, Level threshold, PrintStream stdout, PrintStream stderr) static Level
resolveLoggingVerbosity
(String... args) static Level
resolveLoggingVerbosity
(String[] args, int maxIndex) static Level
resolveLoggingVerbosity
(org.apache.sshd.common.PropertyResolver resolver, String... args) Looks for theConfigFileReaderSupport.LOG_LEVEL_CONFIG_PROP
in the options.static PrintStream
resolvePrintStream
(Level threshold, PrintStream stdout, PrintStream stderr) static org.slf4j.Logger
resolveSystemLogger
(Class<?> clazz, Level threshold) static org.slf4j.Logger
resolveSystemLogger
(String name, Level threshold) static PrintStream
resolveSystemPrintStream
(Level threshold) static boolean
showError
(PrintStream stderr, 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 Details
-
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
-
logStream
-
name
-
-
Constructor Details
-
CliLogger
-
-
Method Details
-
isEnabledLevel
-
log
-
log
-
log
-
resolveLoggingVerbosity
public static Level resolveLoggingVerbosity(org.apache.sshd.common.PropertyResolver resolver, String... args) Looks for theConfigFileReaderSupport.LOG_LEVEL_CONFIG_PROP
in the options. If found, then uses it as the result. Otherwise, invokesresolveLoggingVerbosity(String...)
- Parameters:
resolver
- The-o
options specified by the userargs
- The command line arguments- Returns:
- The resolved verbosity level
-
resolveLoggingVerbosity
-
resolveLoggingVerbosity
-
resolveSystemLogger
-
resolveSystemLogger
-
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
-
isEnabledVerbosityLogging
-
resolvePrintStream
public static PrintStream resolvePrintStream(Level threshold, PrintStream stdout, PrintStream stderr) -
printStackTrace
-
getSystemLogger
-
getSystemLogger
-
resolveSystemPrintStream
-
getLogger
-
getLogger
-
getName
- Specified by:
getName
in interfaceorg.slf4j.Logger
-
readResolve
- Throws:
ObjectStreamException
-