Constructor and Description |
---|
MyLoggingFacade(Logger logger) |
MyLoggingFacade(String className) |
MyLoggingFacade(String className,
boolean debugOn) |
Modifier and Type | Method and Description |
---|---|
void |
debug(String x)
If debug is set on, print the string with the classname and date.
|
void |
error(String x)
Write an error message to the log.
|
void |
error(String x,
Throwable t) |
void |
error(Throwable t) |
String |
getClassName() |
Logger |
getLogger() |
void |
info(String x)
Write an informational message to the log
|
boolean |
isDebugOn()
In debug mode, calls to the
debug(String) method will print out a detailed message. |
void |
setClassName(String className) |
void |
setDebugOn(boolean debugOn)
Enable/disable debugging for this logger
|
void |
warn(String x)
Write a warning to the log.
|
void |
warn(String x,
Throwable t) |
void |
warn(Throwable t) |
public MyLoggingFacade(Logger logger)
public MyLoggingFacade(String className, boolean debugOn)
public MyLoggingFacade(String className)
public String getClassName()
public void setClassName(String className)
public boolean isDebugOn()
debug(String)
method will print out a detailed message. This allows
you to turn on or off debug prints very easily. Note though that while we can control what is printed,
we cannot control Java's evaluation of the string to be printed. If the string is very expensive to
compute then it will still be computed, it just won't get printed.public void setDebugOn(boolean debugOn)
Logable
setDebugOn
in interface Logable
public Logger getLogger()
public void debug(String x)
public void info(String x)
Logable
public void warn(Throwable t)
public void warn(String x)
Logable
public void error(Throwable t)
Copyright © 2019. All Rights Reserved.