Package com.adaptris.core.services
Class LoggingServiceImpl
- java.lang.Object
-
- com.adaptris.core.ServiceImp
-
- com.adaptris.core.services.LoggingServiceImpl
-
- All Implemented Interfaces:
AdaptrisComponent,ComponentLifecycle,ComponentLifecycleExtension,MessageEventGenerator,Service,StateManagedComponent
- Direct Known Subclasses:
LoggingService,LogMessageService
public abstract class LoggingServiceImpl extends ServiceImp
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classLoggingServiceImpl.LoggingLevel
-
Field Summary
-
Fields inherited from class com.adaptris.core.ServiceImp
log
-
-
Constructor Summary
Constructors Constructor Description LoggingServiceImpl()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcloseService()java.lang.StringgetLogCategory()protected static LoggingServiceImpl.LoggingLevelgetLogger(LoggingServiceImpl.LoggingLevel level)LoggingServiceImpl.LoggingLevelgetLogLevel()protected voidinitService()voidprepare()Prepare for initialisation.voidsetLogCategory(java.lang.String logCategory)voidsetLogLevel(LoggingServiceImpl.LoggingLevel level)Set the log level for logging.protected org.slf4j.Loggerslf4jLogger()<T extends LoggingServiceImpl>
TwithLogCategory(java.lang.String logCategory)-
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
-
-
-
-
Method Detail
-
getLogger
protected static LoggingServiceImpl.LoggingLevel getLogger(LoggingServiceImpl.LoggingLevel level)
-
initService
protected void initService() throws CoreException- Specified by:
initServicein classServiceImp- Throws:
CoreException
-
closeService
protected void closeService()
- Specified by:
closeServicein classServiceImp
-
prepare
public void prepare() throws CoreExceptionDescription copied from interface:ComponentLifecycleExtensionPrepare for initialisation.- Throws:
CoreException
-
getLogLevel
public LoggingServiceImpl.LoggingLevel getLogLevel()
-
setLogLevel
public void setLogLevel(LoggingServiceImpl.LoggingLevel level)
Set the log level for logging.- Parameters:
level- the log level, default is DEBUG but can be any one of ERROR, WARN, INFO, DEBUG, TRACE- See Also:
LoggingServiceImpl.LoggingLevel
-
getLogCategory
public java.lang.String getLogCategory()
-
setLogCategory
public void setLogCategory(java.lang.String logCategory)
-
withLogCategory
public <T extends LoggingServiceImpl> T withLogCategory(java.lang.String logCategory)
-
slf4jLogger
protected org.slf4j.Logger slf4jLogger()
-
-