Package org.jrd.backend.core
Class Logger
- java.lang.Object
-
- org.jrd.backend.core.Logger
-
public class Logger extends java.lang.Object
Class for logging Strings and Exceptions
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Logger.Level
private static class
Logger.LoggerHolder
-
Field Summary
Fields Modifier and Type Field Description private boolean
guiLogging
private boolean
isVerbose
private static java.lang.String
NULL_OBJECT_MESSAGE
-
Constructor Summary
Constructors Constructor Description Logger()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
disableGuiLogging()
void
enableGuiLogging()
static java.lang.String
exToString(java.lang.Throwable e)
static Logger
getLogger()
boolean
isVerbose()
void
log(java.lang.String message)
Shorthand forlog(Logger.Level.DEBUG, message)
.void
log(java.lang.Throwable throwable)
Shorthand forlog(Logger.Level.DEBUG, throwable)
.private void
log(Logger.Level level, java.lang.Object o)
void
log(Logger.Level level, java.lang.String message)
void
log(Logger.Level level, java.lang.Throwable throwable)
void
setVerbose(boolean verbose)
-
-
-
Field Detail
-
NULL_OBJECT_MESSAGE
private static final java.lang.String NULL_OBJECT_MESSAGE
- See Also:
- Constant Field Values
-
isVerbose
private boolean isVerbose
-
guiLogging
private boolean guiLogging
-
-
Method Detail
-
setVerbose
public void setVerbose(boolean verbose)
-
isVerbose
public boolean isVerbose()
-
getLogger
public static Logger getLogger()
-
log
public void log(Logger.Level level, java.lang.String message)
-
log
public void log(Logger.Level level, java.lang.Throwable throwable)
-
log
public void log(java.lang.String message)
Shorthand forlog(Logger.Level.DEBUG, message)
.- Parameters:
message
- the string to be logged
-
log
public void log(java.lang.Throwable throwable)
Shorthand forlog(Logger.Level.DEBUG, throwable)
.- Parameters:
throwable
- the exception/error to be logged
-
log
private void log(Logger.Level level, java.lang.Object o)
-
disableGuiLogging
public void disableGuiLogging()
-
enableGuiLogging
public void enableGuiLogging()
-
exToString
public static java.lang.String exToString(java.lang.Throwable e)
-
-