|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.fhg.igd.logging.LoggerProxy
This is a proxy class used by the LoggerFactory for wrapping
LoggerImpl instances in order to be able to exchange loggers
easily in case of configuration change requests.
| Field Summary | |
protected String |
name_
The name of this proxy |
(package private) LoggerImpl |
target_
The target Logger implementation |
| Constructor Summary | |
(package private) |
LoggerProxy(Class wclazz,
String name,
String group)
Hidden construction. |
| Method Summary | |
void |
caught(LogLevel level,
String msg,
Throwable thrown)
This method implicitely calls log(de.fhg.igd.logging.LogLevel, java.lang.String) first, then
caught(Throwable). |
void |
caught(Throwable thrown)
This method is supposed to be used for logging the catching of a Throwable (and subclasses). |
(package private) LoggerImpl |
createBetterTarget()
In case there is a better matching target for this proxy, request and return its instance. |
void |
debug(String msg)
Creates a log entry on LogLevel.DEBUG. |
void |
entering()
This method is supposed to be used for logging the entry of a parameterless method. |
void |
entering(Object[] params)
This method is supposed to be used for logging the entry of a method with a set of parameters. |
boolean |
equals(Object obj)
|
void |
error(String msg)
Creates a log entry on LogLevel.ERROR. |
void |
exiting()
This method is supposed to be used for logging the exit of a method without return value. |
void |
exiting(Object result)
This method is supposed to be used for logging the exit of a method with a return value. |
void |
fatal(String msg)
Creates a log entry on LogLevel.FATAL. |
void |
finalize()
This method will be called by the garbage collector as soon as this proxy is no longer referenced. |
String |
getName()
|
(package private) LoggerImpl |
getTarget()
|
int |
hashCode()
|
void |
info(String msg)
Creates a log entry on LogLevel.INFO. |
boolean |
isEnabled(LogLevel level)
Find out if logging would be performed at the given log level. |
void |
log(LogLevel level,
String msg)
This is the generic log method to be used for creating a log entry on the specified log level. |
void |
severe(String msg)
Creates a log entry on LogLevel.SEVERE. |
void |
throwing(LogLevel level,
String msg,
Throwable thrown)
This method implicitely calls log(de.fhg.igd.logging.LogLevel, java.lang.String) first, then
throwing(Throwable). |
void |
throwing(Throwable thrown)
This method is supposed to be used for logging the creation and method exit by a Throwable (and subclasses). |
String |
toString()
|
void |
trace(String msg)
Creates a log entry on LogLevel.TRACE. |
(package private) void |
updateTarget(LoggerImpl target)
Exchange the target of this proxy. |
void |
warning(String msg)
Creates a log entry on LogLevel.WARNING. |
| Methods inherited from class java.lang.Object |
clone, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected String name_
LoggerImpl target_
Logger implementation
| Constructor Detail |
LoggerProxy(Class wclazz,
String name,
String group)
wclazz - The Wrapper implementation class to be usedname - The name of this proxygroup - The group of this proxy and the target logger| Method Detail |
public String getName()
LoggerImpl getTarget()
LoggerImpl createBetterTarget()
null.
null
if there is no better match availablevoid updateTarget(LoggerImpl target)
target - The new target for this proxy
public void log(LogLevel level,
String msg)
Logger
log in interface Loggerlevel - The log level to be used for creating the log entrymsg - The message to be written into the log entrypublic void trace(String msg)
LoggerLogLevel.TRACE.
trace in interface Loggermsg - The message to be written into the log entrypublic void debug(String msg)
LoggerLogLevel.DEBUG.
debug in interface Loggermsg - The message to be written into the log entrypublic void info(String msg)
LoggerLogLevel.INFO.
info in interface Loggermsg - The message to be written into the log entrypublic void warning(String msg)
LoggerLogLevel.WARNING.
warning in interface Loggermsg - The message to be written into the log entrypublic void error(String msg)
LoggerLogLevel.ERROR.
error in interface Loggermsg - The message to be written into the log entrypublic void severe(String msg)
LoggerLogLevel.SEVERE.
severe in interface Loggermsg - The message to be written into the log entrypublic void fatal(String msg)
LoggerLogLevel.FATAL.
fatal in interface Loggermsg - The message to be written into the log entrypublic void entering()
LoggerLogLevel.TRACE.
entering in interface Loggerpublic void entering(Object[] params)
LoggerLogLevel.TRACE.
entering in interface Loggerparams - The method parameters, for printing the
toString() method will be called on each objectpublic void exiting()
LoggerLogLevel.TRACE.
exiting in interface Loggerpublic void exiting(Object result)
LoggerLogLevel.TRACE.
exiting in interface Loggerresult - The return value, for printing the
toString() method will be calledpublic void throwing(Throwable thrown)
LoggerThrowable (and subclasses). Hereby, the used
log level will be LogLevel.TRACE.
throwing in interface Loggerthrown - The exception that will be thrown
public void throwing(LogLevel level,
String msg,
Throwable thrown)
LoggerLogger.log(de.fhg.igd.logging.LogLevel, java.lang.String) first, then
Logger.throwing(Throwable).
throwing in interface Loggerlevel - The log level to be used for creating the log entrymsg - The message to be written into the log entrythrown - The exception that will be thrownpublic void caught(Throwable thrown)
LoggerThrowable (and subclasses). Hereby, the used
log level will be LogLevel.TRACE.
caught in interface Loggerthrown - The exception that has been caught
public void caught(LogLevel level,
String msg,
Throwable thrown)
LoggerLogger.log(de.fhg.igd.logging.LogLevel, java.lang.String) first, then
Logger.caught(Throwable).
caught in interface Loggerlevel - The log level to be used for creating the log entrymsg - The message to be written into the log entrythrown - The exception that has been caughtpublic boolean isEnabled(LogLevel level)
LoggerThis method might be useful in cases of costly log message creation which should be performed only if really needed.
isEnabled in interface Loggerlevel - The log level to check for
public void finalize()
public boolean equals(Object obj)
public int hashCode()
public String toString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||