|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectwt.log4j.LogR
public final class LogR
Short for LoggerRepository this class helps ensure that the appropriate log4j LoggerRepository is used and should be used in place of log4j's Logger.getLogger() and LogManager.getLoggerRepository() APIs.
Internally, this class works in conjunction with Log4jRepositySelector.
Note that for any of this to work properly, a separate copy of this class
must be loaded by each context (e.g. web application) that is to have a
separate LoggerRepository.
Supported API: true
Extendable: false
| Method Summary | |
|---|---|
static Logger |
getLogger(String loggerName)
This method should be used to acquire Logger objects from log4j rather than directly calling Logger.getLogger(). |
static LoggerRepository |
getLoggerRepository()
This method should be used to acquire LoggerRepository objects from log4j rather than directly calling LogManager.getLoggerRepository(). |
static void |
initProperties()
This should be called to initialize various system properties for convenient use for log4j configuration. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static void initProperties()
This should be called before there is any chance of log4j initially
reading its configuration file if you wish to allow use of these properties
in that configuration file (which is the point after all). This is already
handled for method server, server manager, and Windchill web app cases.
Supported API: true
public static Logger getLogger(String loggerName)
public static LoggerRepository getLoggerRepository()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||