public class MultiDestinationAuditLogger extends AuditLoggerPlugin implements ResourceLoaderAware
"class" : "solr.MultiDestinationAuditLogger",
"plugins" : [
{ "class" : "solr.SolrLogAuditLoggerPlugin" },
{ "class" : "solr.MyOtherAuditPlugin"}
]
This interface may change in next release and is marked experimentalAuditLoggerPlugin.AuditEventFormatter, AuditLoggerPlugin.JSONAuditEventFormatter, AuditLoggerPlugin.MuteRuleSolrInfoBean.Category, SolrInfoBean.GroupeventTypes, formatter, metricManager, numErrors, numLogged, numLost, queuedTime, registryName, requestTimes, totalTime| Constructor and Description |
|---|
MultiDestinationAuditLogger() |
| Modifier and Type | Method and Description |
|---|---|
void |
audit(AuditEvent event)
Passes the AuditEvent to all sub plugins in parallel.
|
void |
close()
Waits 30s for async queue to drain, then closes executor threads.
|
void |
inform(ResourceLoader loader) |
void |
init(Map<String,Object> pluginConfig)
Initialize the plugin from security.json
|
void |
initializeMetrics(SolrMetricManager manager,
String registryName,
String tag,
String scope)
Initializes metrics specific to this producer
|
boolean |
shouldLog(AuditEvent.EventType eventType)
Checks whether this event type should be logged based on "eventTypes" config parameter.
|
auditAsync, doAudit, getCategory, getDescription, getMetricNames, getMetricRegistry, getName, run, setFormatter, shouldMute, waitForQueueToDrainclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetMetricsSnapshot, registerMetricNamepublic void audit(AuditEvent event)
AuditEvent to be able to pull context info.audit in class AuditLoggerPluginevent - the audit eventpublic void init(Map<String,Object> pluginConfig)
init in class AuditLoggerPluginpluginConfig - the config for the pluginpublic boolean shouldLog(AuditEvent.EventType eventType)
AuditLoggerPluginshouldLog in class AuditLoggerPlugineventType - the event type to considerpublic void inform(ResourceLoader loader)
inform in interface ResourceLoaderAwarepublic void initializeMetrics(SolrMetricManager manager, String registryName, String tag, String scope)
SolrMetricProducerinitializeMetrics in interface SolrMetricProducerinitializeMetrics in class AuditLoggerPluginmanager - an instance of SolrMetricManagerregistryName - registry name where metrics are registeredtag - a symbolic tag that represents this instance of the producer,
or a group of related instances that have the same life-cycle. This tag is
used when managing life-cycle of some metrics and is set when
SolrMetricProducer.initializeMetrics(SolrMetricManager, String, String, String) is called.scope - scope of the metrics (eg. handler name) to separate metrics ofpublic void close()
throws IOException
AuditLoggerPluginsuper.close() or AuditLoggerPlugin.waitForQueueToDrain(int)
before shutting itself down to make sure they can complete logging events in the queue.close in interface Closeableclose in interface AutoCloseableclose in class AuditLoggerPluginIOExceptionCopyright © 2000-2019 Apache Software Foundation. All Rights Reserved.