|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.oddjob.logging.OddjobNDC
public class OddjobNDC
An OddjobNDC is a Nested Diagnostic Context for Oddjob. It provides a way of allowing component by component logging.
It is very crude wrapper for the Log4j MDC class. One day it would be nice to work out how to apply this to other logging utilities.
Note that this is a thread based nested diagnostic context that does not interfere with Log4j's own. It populates log4j's mapped diagnostic context instead.
Nested Class Summary | |
---|---|
static class |
OddjobNDC.LoggerAndJob
Holds Logger and Job information for the Stack. |
Field Summary |
---|
Fields inherited from interface org.oddjob.logging.LoggingConstants |
---|
MDC_JOB_NAME, MDC_LOGGER |
Method Summary | |
---|---|
static OddjobNDC.LoggerAndJob |
peek()
Looks at the last diagnostic context at the top of this NDC without removing it. |
static OddjobNDC.LoggerAndJob |
pop()
Clients should call this method before leaving a diagnostic context. |
static void |
push(String loggerName,
Object job)
Push new diagnostic context information for the current thread. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static OddjobNDC.LoggerAndJob pop()
The returned value is the value that was pushed last. If no context is available, then the empty string "" is returned.
public static OddjobNDC.LoggerAndJob peek()
The returned value is the value that was pushed last. If no context is available, then the empty string "" is returned.
public static void push(String loggerName, Object job)
loggerName
- The new diagnostic context information.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |