|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectfr.umlv.tatoo.cc.common.log.ReporterFactory
public class ReporterFactory
This class permits to
install/uninstall a reporter
on the current thread.
| Constructor Summary | |
|---|---|
ReporterFactory()
|
|
| Method Summary | |
|---|---|
protected Reporter |
createDefaultReporter()
Creates a default reporter used as thread local reporter. |
Reporter |
getCurrentReporter()
Returns the reporter attached to the current thread. |
static Info |
getDefaultInfo()
Returns the Info object used to derive the info object used to report an event or an error. |
static ReporterFactory |
getFactory()
Returns the reporter factory currently used. |
static Level |
getLogLevel()
Returns the log level of the reporter attached to the current thread. |
void |
installCurrentReporter(Reporter reporter)
Changes the reporter of the current thread. |
static void |
setAndSealDefaultInfo(Info defaultInfo)
Changes the info object attached on the thread local reporter and used to derive the info object used to report an event or an error . |
static void |
setFactory(ReporterFactory factory)
Changes the Reporter Factory used. |
static void |
setLogLevel(Level level)
Sets log level of the reporter attached to the current thread. |
void |
uninstallCurrentReporter()
Reverts the reporter of the current thread to the default reporter. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ReporterFactory()
| Method Detail |
|---|
public void installCurrentReporter(Reporter reporter)
reporter - the new reporterpublic void uninstallCurrentReporter()
createDefaultReporter()public Reporter getCurrentReporter()
protected Reporter createDefaultReporter()
installCurrentReporter(Reporter) is called.
public static void setLogLevel(Level level)
level - the new log level.getFactory(),
getCurrentReporter(),
Reporter.setLogLevel(Level)public static Level getLogLevel()
getFactory(),
getCurrentReporter(),
Reporter.getLogLevel()public static Info getDefaultInfo()
sealed
so any modification will not change the default info of
the thread local reporter.
setAndSealDefaultInfo(Info),
Info.derive(Level, String, Object[]),
Info.isSealed()public static void setAndSealDefaultInfo(Info defaultInfo)
defaultInfo - the new default info of the thread local reporter.Info.derive(Level, String, Object[])public static ReporterFactory getFactory()
public static void setFactory(ReporterFactory factory)
factory - the new reporter factory.uninstallCurrentReporter()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||