Class Logger
- java.lang.Object
-
- com.vividsolutions.jump.workbench.Logger
-
public class Logger extends Object
a generalized logger interface for OJ package usage currently based on log4j v1.2 TODO: - move to commons-logging to be more implementation independent -implement class:line logging for legacy log4j using code- Author:
- ed
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classLogger.LogLevel
-
Constructor Summary
Constructors Constructor Description Logger()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voiddebug(String msg)static voiddebug(String msg, Throwable t)static voiddebug(Throwable t)static voiderror(String msg)static voiderror(String msg, Throwable t)static voiderror(Throwable t)static voidfatal(String msg)static voidfatal(String msg, Throwable t)static voidfatal(Throwable t)static Logger.LogLevelgetLevel()static List<File>getLogFiles()get current file appenders, mainly for display purposes eg.static voidinfo(String msg)static voidinfo(String msg, Throwable t)static voidinfo(Throwable t)static booleanisDebugEnabled()static booleanisErrorEnabled()static booleanisFatalEnabled()static booleanisInfoEnabled()static booleanisTraceEnabled()static booleanisWarnEnabled()static voidlog(String msg, Throwable t, Logger.LogLevel logLevel, StackTraceElement calledFrom)log msg, throwable with log level from one stack before the given StackTraceElement code locationstatic voidsetLevel(String levelString)setting current log level for the root logger (internally use org.apache.log4j.Level.toLevel)static voidtrace(String msg)static voidtrace(String msg, Throwable t)static voidtrace(Throwable t)static voidwarn(String msg)static voidwarn(String msg, Throwable t)static voidwarn(Throwable t)
-
-
-
Method Detail
-
fatal
public static void fatal(String msg)
-
error
public static void error(String msg)
-
warn
public static void warn(String msg)
-
info
public static void info(String msg)
-
debug
public static void debug(String msg)
-
trace
public static void trace(String msg)
-
fatal
public static void fatal(Throwable t)
-
error
public static void error(Throwable t)
-
warn
public static void warn(Throwable t)
-
info
public static void info(Throwable t)
-
debug
public static void debug(Throwable t)
-
trace
public static void trace(Throwable t)
-
log
public static void log(String msg, Throwable t, Logger.LogLevel logLevel, StackTraceElement calledFrom)
log msg, throwable with log level from one stack before the given StackTraceElement code location- Parameters:
msg- message to logt- throwable to loglogLevel- log level of the messagecalledFrom- Exception stacktrace
-
getLogFiles
public static List<File> getLogFiles()
get current file appenders, mainly for display purposes eg. inGenerateLogPlugIn- Returns:
- files list
-
setLevel
public static void setLevel(String levelString)
setting current log level for the root logger (internally use org.apache.log4j.Level.toLevel)- Parameters:
levelString- a string representing the LogLevel
-
getLevel
public static Logger.LogLevel getLevel()
- Returns:
- the current log level for the calling class
-
isFatalEnabled
public static boolean isFatalEnabled()
-
isErrorEnabled
public static boolean isErrorEnabled()
-
isWarnEnabled
public static boolean isWarnEnabled()
-
isInfoEnabled
public static boolean isInfoEnabled()
-
isDebugEnabled
public static boolean isDebugEnabled()
-
isTraceEnabled
public static boolean isTraceEnabled()
-
-