Package edu.uiuc.ncsa.security.core.util
Class MyLoggingFacade
- java.lang.Object
-
- edu.uiuc.ncsa.security.core.util.MyLoggingFacade
-
-
Field Summary
Fields Modifier and Type Field Description static Level
DEFAULT_LOG_LEVEL
-
Constructor Summary
Constructors Constructor Description MyLoggingFacade(String className)
MyLoggingFacade(String className, boolean debugOn)
MyLoggingFacade(Logger logger)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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()
String
getFileName()
String
getHost()
Logger
getLogger()
Level
getLogLevel()
boolean
hasHost()
void
info(String x)
Write an informational message to the logboolean
isDebugOn()
In debug mode, calls to thedebug(String)
method will print out a detailed message.protected String
msg(String x)
void
setClassName(String className)
void
setDebugOn(boolean debugOn)
Enable/disable debugging for this loggervoid
setFileName(String fileName)
void
setHost(String host)
void
setLogLevel(Level logLevel)
void
warn(String x)
Write a warning to the log.void
warn(String x, Throwable t)
void
warn(Throwable t)
-
-
-
Field Detail
-
DEFAULT_LOG_LEVEL
public static final Level DEFAULT_LOG_LEVEL
-
-
Method Detail
-
getLogLevel
public Level getLogLevel()
-
setLogLevel
public void setLogLevel(Level logLevel)
-
getHost
public String getHost()
-
setHost
public void setHost(String host)
-
hasHost
public boolean hasHost()
-
getClassName
public String getClassName()
-
setClassName
public void setClassName(String className)
-
isDebugOn
public boolean isDebugOn()
In debug mode, calls to thedebug(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.
-
setDebugOn
public void setDebugOn(boolean debugOn)
Description copied from interface:Logable
Enable/disable debugging for this logger- Specified by:
setDebugOn
in interfaceLogable
-
getLogger
public Logger getLogger()
-
debug
public void debug(String x)
If debug is set on, print the string with the classname and date. Otherwise, do not print debug messages. This allows you to switch debug prints on and off throughout your code via configuration.
-
info
public void info(String x)
Description copied from interface:Logable
Write an informational message to the log
-
warn
public void warn(Throwable t)
-
warn
public void warn(String x)
Description copied from interface:Logable
Write a warning to the log. This indicates a severe, but non-fatal condition exists.
-
error
public void error(Throwable t)
-
error
public void error(String x)
Description copied from interface:Logable
Write an error message to the log. Typically this is invoked as the last command before throwing an exception.
-
getFileName
public String getFileName()
-
setFileName
public void setFileName(String fileName)
-
-