Class Logger
java.lang.Object
com.vividsolutions.jump.workbench.Logger
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 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidstatic voidstatic voidstatic voidstatic voidstatic voidstatic voidstatic voidstatic voidstatic Logger.LogLevelgetLevel()get current file appenders, mainly for display purposes eg. inGenerateLogPlugInstatic voidstatic voidstatic voidstatic booleanstatic booleanstatic booleanstatic booleanstatic booleanstatic booleanstatic 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 voidsetting current log level for the root logger (internally use org.apache.log4j.Level.toLevel)static voidstatic voidstatic voidstatic voidstatic voidstatic void
-
Constructor Details
-
Logger
public Logger()
-
-
Method Details
-
fatal
-
error
-
warn
-
info
-
debug
-
trace
-
fatal
-
error
-
warn
-
info
-
debug
-
trace
-
fatal
-
error
-
warn
-
info
-
debug
-
trace
-
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
get current file appenders, mainly for display purposes eg. inGenerateLogPlugIn- Returns:
- files list
-
setLevel
setting current log level for the root logger (internally use org.apache.log4j.Level.toLevel)- Parameters:
levelString- a string representing the 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()
-