@ComponentProfile(summary="Remove a mapped diagnostic context for logging; useful for filtering", tag="service,logging,debug") public class RemoveLoggingContext extends ServiceImp
MDC.remove(String)
.
If you have a large number of workflows then it may be useful to use a mapped diagnostic context to provide additional information into your logfile.
In the adapter configuration file this class is aliased as remove-logging-context-service which is the preferred alternative to the fully qualified classname when building your configuration.
log
CONFIRMATION_ID_KEY
Constructor and Description |
---|
RemoveLoggingContext() |
RemoveLoggingContext(java.lang.String key) |
Modifier and Type | Method and Description |
---|---|
protected void |
closeService() |
void |
doService(AdaptrisMessage msg)
Apply the service to the message.
|
java.lang.String |
getKey() |
protected void |
initService() |
void |
prepare()
Prepare for initialisation.
|
void |
setKey(java.lang.String key)
Set the key for the mapped diagnostic context.
|
changeState, close, continueOnFailure, createName, createQualifier, getContinueOnFail, getIsConfirmation, getIsTrackingEndpoint, getLookupName, getUniqueId, init, isBranching, isConfirmation, isTrackingEndpoint, requestClose, requestInit, requestStart, requestStop, rethrowServiceException, retrieveComponentState, setContinueOnFail, setIsConfirmation, setIsTrackingEndpoint, setLookupName, setUniqueId, start, stop
public RemoveLoggingContext()
public RemoveLoggingContext(java.lang.String key)
public void doService(AdaptrisMessage msg) throws ServiceException
Service
Apply the service to the message.
msg
- the AdaptrisMessage
to processServiceException
- wrapping any underlying Exception
sprotected void initService() throws CoreException
initService
in class ServiceImp
CoreException
protected void closeService()
closeService
in class ServiceImp
public void prepare() throws CoreException
ComponentLifecycleExtension
CoreException
public java.lang.String getKey()
public void setKey(java.lang.String key)
key
- the key to set