Package com.trilead.ssh2.log
Class Logger
- java.lang.Object
-
- com.trilead.ssh2.log.Logger
-
public class Logger extends java.lang.ObjectLogger - a very simple logger, mainly used during development. Is not based on log4j (to reduce external dependencies). However, if needed, something like log4j could easily be hooked in.For speed reasons, the static variables are not protected with semaphores. In other words, if you dynamicaly change the logging settings, then some threads may still use the old setting.
- Version:
- $Id: Logger.java,v 1.2 2008/03/03 07:01:36 cplattne Exp $
-
-
Field Summary
Fields Modifier and Type Field Description static booleanenabledprivate java.util.logging.Loggerlogstatic DebugLoggerlogger
-
Constructor Summary
Constructors Constructor Description Logger(java.lang.Class x)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static LoggergetLogger(java.lang.Class x)booleanisEnabled()private java.util.logging.Levellevel(int lv)voidlog(int lv, java.lang.String message)voidlog(int lv, java.lang.String message, java.lang.Throwable cause)
-
-
-
Field Detail
-
enabled
public static boolean enabled
-
logger
public static DebugLogger logger
-
log
private java.util.logging.Logger log
-
-
Method Detail
-
getLogger
public static final Logger getLogger(java.lang.Class x)
-
isEnabled
public final boolean isEnabled()
-
log
public final void log(int lv, java.lang.String message)
-
log
public final void log(int lv, java.lang.String message, java.lang.Throwable cause)
-
level
private java.util.logging.Level level(int lv)
-
-