Package com.adaptris.core.services
Class LogMessageService
- java.lang.Object
-
- com.adaptris.core.ServiceImp
-
- com.adaptris.core.services.LoggingServiceImpl
-
- com.adaptris.core.services.LogMessageService
-
- All Implemented Interfaces:
AdaptrisComponent,ComponentLifecycle,ComponentLifecycleExtension,MessageEventGenerator,Service,StateManagedComponent
@ComponentProfile(summary="Log the message to the log file; useful for debugging", tag="service,logging,debug") public class LogMessageService extends LoggingServiceImplService which logs the
AdaptrisMessageto the configured logger for debugging purposes.In the adapter configuration file this class is aliased as log-message-service which is the preferred alternative to the fully qualified classname when building your configuration.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.adaptris.core.services.LoggingServiceImpl
LoggingServiceImpl.LoggingLevel
-
-
Field Summary
-
Fields inherited from class com.adaptris.core.ServiceImp
log
-
-
Constructor Summary
Constructors Constructor Description LogMessageService()LogMessageService(LoggingServiceImpl.LoggingLevel level)LogMessageService(LoggingServiceImpl.LoggingLevel level, java.lang.String loggingPrefix)LogMessageService(java.lang.String uniqueId)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddoService(AdaptrisMessage msg)Apply the service to the message.MessageLoggergetLoggingFormat()java.lang.StringgetLogPrefix()MessageLoggerloggingFormat()voidsetLoggingFormat(MessageLogger ml)voidsetLogPrefix(java.lang.String s)Set the logging prefix to the output-
Methods inherited from class com.adaptris.core.services.LoggingServiceImpl
closeService, getLogCategory, getLogger, getLogLevel, initService, prepare, setLogCategory, setLogLevel, slf4jLogger, withLogCategory
-
Methods inherited from class com.adaptris.core.ServiceImp
changeState, close, continueOnFailure, createName, createQualifier, getContinueOnFail, getIsTrackingEndpoint, getUniqueId, init, isBranching, isTrackingEndpoint, requestClose, requestInit, requestStart, requestStop, retrieveComponentState, setContinueOnFail, setIsTrackingEndpoint, setUniqueId, start, stop
-
-
-
-
Constructor Detail
-
LogMessageService
public LogMessageService()
-
LogMessageService
public LogMessageService(LoggingServiceImpl.LoggingLevel level)
-
LogMessageService
public LogMessageService(LoggingServiceImpl.LoggingLevel level, java.lang.String loggingPrefix)
-
LogMessageService
public LogMessageService(java.lang.String uniqueId)
-
-
Method Detail
-
doService
public void doService(AdaptrisMessage msg) throws ServiceException
Description copied from interface:ServiceApply the service to the message.
- Parameters:
msg- theAdaptrisMessageto process- Throws:
ServiceException- wrapping any underlyingExceptions- See Also:
#doService(com.adaptris.core.AdaptrisMessage)
-
getLogPrefix
public java.lang.String getLogPrefix()
-
setLogPrefix
public void setLogPrefix(java.lang.String s)
Set the logging prefix to the output- Parameters:
s- the logging prefix, default ''
-
getLoggingFormat
public MessageLogger getLoggingFormat()
-
setLoggingFormat
public void setLoggingFormat(MessageLogger ml)
-
loggingFormat
public MessageLogger loggingFormat()
-
-