Package org.codice.ddf.platform.logging
Class LoggingService
java.lang.Object
org.codice.ddf.platform.logging.LoggingService
- All Implemented Interfaces:
LoggingServiceMBean,org.ops4j.pax.logging.spi.PaxAppender
public class LoggingService
extends Object
implements org.ops4j.pax.logging.spi.PaxAppender, LoggingServiceMBean
A custom
PaxAppender which receives PaxLoggingEvents and is the Jolokia endpoint for the Logging UI in the
Admin Console.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddestroy()voiddoAppend(org.ops4j.pax.logging.spi.PaxLoggingEvent paxLoggingEvent) Called each time aPaxLoggingEventis created in the systemintvoidinit()Retrieves all of the storedLogEventsvoidsetMaxLogEvents(int newMaxLogEvents) Sets the maximum number ofLogEvents to store
-
Constructor Details
-
LoggingService
Constructor- Parameters:
mBeanServer- object used to register this object as an MBean
-
-
Method Details
-
init
public void init() throws MBeanRegistrationException, MalformedObjectNameException, InstanceAlreadyExistsException, InstanceNotFoundException, NotCompliantMBeanException -
destroy
public void destroy() -
doAppend
public void doAppend(org.ops4j.pax.logging.spi.PaxLoggingEvent paxLoggingEvent) Called each time aPaxLoggingEventis created in the system- Specified by:
doAppendin interfaceorg.ops4j.pax.logging.spi.PaxAppender
-
retrieveLogEvents
Description copied from interface:LoggingServiceMBeanRetrieves all of the storedLogEvents- Specified by:
retrieveLogEventsin interfaceLoggingServiceMBean- Returns:
- non-null list of
LogEvents in ascending order
-
setMaxLogEvents
public void setMaxLogEvents(int newMaxLogEvents) Sets the maximum number ofLogEvents to store- Parameters:
newMaxLogEvents- This number cannot be less than 0 or greater thanMAX_LOG_EVENTS_LIMIT. In the event that this parameter is less than 0 or greater thanMAX_LOG_EVENTS_LIMIT, the maximum log events stored will set set toMAX_LOG_EVENTS_LIMIT.
-
getMaxLogEvents
public int getMaxLogEvents()
-