Package com.adaptris.core.services
Class RemoveLoggingContext
java.lang.Object
com.adaptris.core.ServiceImp
com.adaptris.core.services.RemoveLoggingContext
- All Implemented Interfaces:
AdaptrisComponent
,ComponentLifecycle
,ComponentLifecycleExtension
,ConfigComment
,MessageEventGenerator
,Service
,StateManagedComponent
@ComponentProfile(summary="Remove a mapped diagnostic context for logging; useful for filtering",
tag="service,logging,debug")
public class RemoveLoggingContext
extends ServiceImp
Remove a mapped diagnostic context via
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.
-
Field Summary
Fields inherited from class com.adaptris.core.ServiceImp
log
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
void
doService
(AdaptrisMessage msg) Apply the service to the message.getKeys()
protected void
void
prepare()
Prepare for initialisation.void
Set the keys for the mapped diagnostic context.Methods inherited from class com.adaptris.core.ServiceImp
changeState, close, continueOnFailure, createName, createQualifier, getComments, getContinueOnFail, getIsTrackingEndpoint, getUniqueId, init, isBranching, isTrackingEndpoint, requestClose, requestInit, requestStart, requestStop, retrieveComponentState, setComments, setContinueOnFail, setIsTrackingEndpoint, setUniqueId, start, stop
-
Constructor Details
-
RemoveLoggingContext
public RemoveLoggingContext() -
RemoveLoggingContext
-
-
Method Details
-
doService
Description copied from interface:Service
Apply the service to the message.
- Parameters:
msg
- theAdaptrisMessage
to process- Throws:
ServiceException
- wrapping any underlyingException
s
-
initService
- Specified by:
initService
in classServiceImp
- Throws:
CoreException
-
closeService
protected void closeService()- Specified by:
closeService
in classServiceImp
-
prepare
Description copied from interface:ComponentLifecycleExtension
Prepare for initialisation.- Throws:
CoreException
-
getKeys
-
setKeys
Set the keys for the mapped diagnostic context.- Parameters:
keys
- the key to set
-