Package org.jboss.as.controller.audit
Interface ManagedAuditLogger
-
- All Superinterfaces:
AuditLogger
- All Known Implementing Classes:
ManagedAuditLoggerImpl
public interface ManagedAuditLogger extends AuditLogger
Abstract base class forAuditLogger
implementations.- Author:
- Brian Stansberry (c) 2012 Red Hat Inc.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
ManagedAuditLogger.AuditLogHandlerUpdater
The audit log handler updater.-
Nested classes/interfaces inherited from interface org.jboss.as.controller.audit.AuditLogger
AuditLogger.Status
-
-
Field Summary
-
Fields inherited from interface org.jboss.as.controller.audit.AuditLogger
NO_OP_LOGGER
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description void
addFormatter(AuditLogItemFormatter formatter)
Add a formattervoid
bootDone()
Callback for the controller to call when the controller has been bootedManagedAuditLogger
createNewConfiguration(boolean manualCommit)
Create another audit logger configuration, e.g.boolean
getHandlerDisabledDueToFailure(String name)
Get whether a handler was disabled due to failuresint
getHandlerFailureCount(String name)
Get the current failure count of a handlerJsonAuditLogItemFormatter
getJsonFormatter(String name)
Gets a formatter by its nameAuditLogger.Status
getLoggerStatus()
Gets the status of the audit loggerManagedAuditLogger.AuditLogHandlerUpdater
getUpdater()
Gets the handler updater used to schedule updates to the handlersboolean
isLogBoot()
Get whether this audit logger logs operations on bootboolean
isLogReadOnly()
Get whether this audit logger logs read-only operationsdefault List<org.jboss.dmr.ModelNode>
listLastEntries(String name)
Gets the last log entriesvoid
recycleHandler(String name)
Recycles a handler.void
removeFormatter(String name)
Remove a formattervoid
setLogBoot(boolean logBoot)
Set whether to log operations on bootvoid
setLoggerStatus(AuditLogger.Status newStatus)
Sets the status of the audit loggervoid
setLogReadOnly(boolean logReadOnly)
Set whether to log read-only operationsvoid
startBoot()
Callback for the controller to call before the controller is bootedvoid
updateHandlerFormatter(String name, String formatterName)
Update the handler formatter.void
updateHandlerMaxFailureCount(String name, int count)
Update the handler max failure count.void
updateInMemoryHandlerMaxHistory(String name, int maxHistory)
Update the handler history size.void
updateSyslogHandlerAppName(String name, String appName)
Update the handler app-name.void
updateSyslogHandlerFacility(String name, SyslogAuditLogHandler.Facility facility)
Update the syslog handler facility.void
updateSyslogHandlerReconnectTimeout(String name, int reconnectTimeout)
Update the handler reconnect timeout.-
Methods inherited from interface org.jboss.as.controller.audit.AuditLogger
log, logJmxMethodAccess
-
-
-
-
Method Detail
-
isLogReadOnly
boolean isLogReadOnly()
Get whether this audit logger logs read-only operations- Returns:
- whether this audit logger logs read-only operations
-
setLogReadOnly
void setLogReadOnly(boolean logReadOnly)
Set whether to log read-only operations- Parameters:
logReadOnly
- wheter to log read-only operations
-
isLogBoot
boolean isLogBoot()
Get whether this audit logger logs operations on boot- Returns:
- whether this audit logger logs operations on boot
-
setLogBoot
void setLogBoot(boolean logBoot)
Set whether to log operations on boot- Parameters:
logBoot
- whether to log operations on boot
-
getLoggerStatus
AuditLogger.Status getLoggerStatus()
Gets the status of the audit logger- Returns:
- the status
-
setLoggerStatus
void setLoggerStatus(AuditLogger.Status newStatus)
Sets the status of the audit logger- Parameters:
newStatus
- the status
-
getUpdater
ManagedAuditLogger.AuditLogHandlerUpdater getUpdater()
Gets the handler updater used to schedule updates to the handlers- Returns:
- the handler updater
-
recycleHandler
void recycleHandler(String name)
Recycles a handler. This stops it, and resets the failure count so that the next time it is used it will reinitialize.- Parameters:
name
- the name of the handler
-
createNewConfiguration
ManagedAuditLogger createNewConfiguration(boolean manualCommit)
Create another audit logger configuration, e.g. for JMX which has its own global config of the audit logger- Parameters:
manualCommit
- iftrue
the caller is responsible for applying the changes themselves, iffalse
the changes will be committed after the next log records has been written- Returns:
- the new configuration
-
addFormatter
void addFormatter(AuditLogItemFormatter formatter)
Add a formatter- Parameters:
formatter
- the formatter
-
updateHandlerFormatter
void updateHandlerFormatter(String name, String formatterName)
Update the handler formatter. This will take effect immediately.- Parameters:
name
- the name of the handlerformatterName
- the name of the formatter
-
updateHandlerMaxFailureCount
void updateHandlerMaxFailureCount(String name, int count)
Update the handler max failure count. This will take effect immediately- Parameters:
name
- the name of the handlercount
- the max failure count
-
updateSyslogHandlerFacility
void updateSyslogHandlerFacility(String name, SyslogAuditLogHandler.Facility facility)
Update the syslog handler facility. This will take effect immediately.- Parameters:
name
- the name of the syslog handlerfacility
- the facility
-
updateSyslogHandlerAppName
void updateSyslogHandlerAppName(String name, String appName)
Update the handler app-name. This will take effect immediately- Parameters:
name
- the name of the handlerappName
- the app name
-
updateSyslogHandlerReconnectTimeout
void updateSyslogHandlerReconnectTimeout(String name, int reconnectTimeout)
Update the handler reconnect timeout. This will take effect immediately- Parameters:
name
- the name of the handlerreconnectTimeout
- the app name
-
updateInMemoryHandlerMaxHistory
void updateInMemoryHandlerMaxHistory(String name, int maxHistory)
Update the handler history size.- Parameters:
name
- the name of the handlermaxHistory
- the history size of the handler
-
removeFormatter
void removeFormatter(String name)
Remove a formatter- Parameters:
name
- the formatter name
-
getHandlerFailureCount
int getHandlerFailureCount(String name)
Get the current failure count of a handler- Parameters:
name
- the name of the handler- Returns:
- the failure count
-
getHandlerDisabledDueToFailure
boolean getHandlerDisabledDueToFailure(String name)
Get whether a handler was disabled due to failures- Parameters:
name
- the name of the handler- Returns:
- whether it is disabled
-
getJsonFormatter
JsonAuditLogItemFormatter getJsonFormatter(String name)
Gets a formatter by its name- Parameters:
name
- the name of the formatter- Returns:
- the formatter
-
listLastEntries
default List<org.jboss.dmr.ModelNode> listLastEntries(String name)
Gets the last log entries- Parameters:
name
- the name of the handler- Returns:
- the last log entries of the handler
-
startBoot
void startBoot()
Callback for the controller to call before the controller is booted
-
bootDone
void bootDone()
Callback for the controller to call when the controller has been booted
-
-