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 class
LoggingServiceImpl.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 void
closeService()
java.lang.String
getLogCategory()
protected static LoggingServiceImpl.LoggingLevel
getLogger(LoggingServiceImpl.LoggingLevel level)
LoggingServiceImpl.LoggingLevel
getLogLevel()
protected void
initService()
void
prepare()
Prepare for initialisation.void
setLogCategory(java.lang.String logCategory)
void
setLogLevel(LoggingServiceImpl.LoggingLevel level)
Set the log level for logging.protected org.slf4j.Logger
slf4jLogger()
<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:
initService
in classServiceImp
- Throws:
CoreException
-
closeService
protected void closeService()
- Specified by:
closeService
in classServiceImp
-
prepare
public void prepare() throws CoreException
Description copied from interface:ComponentLifecycleExtension
Prepare 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()
-
-