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:
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
-
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>
TprintStackTrace(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 theConfigFileReaderSupport.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
-
-
-
-
Field Detail
-
LOG_TIME_FORMATTER
public static final java.text.DateFormat LOG_TIME_FORMATTER
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
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
-
-
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 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
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 interfaceorg.slf4j.Logger
-
readResolve
protected java.lang.Object readResolve() throws java.io.ObjectStreamException
- Throws:
java.io.ObjectStreamException
-
-