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, numErrors, numLogged, numLost, queuedTime, requestTimes, solrMetricsContext, 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, getName, getSolrMetricsContext, initializeMetrics, run, setFormatter, shouldMute, waitForQueueToDrainclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetMetricRegistry, getMetricsSnapshot, registerMetricNamegetUniqueMetricTagpublic 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 SolrMetricProducermanager - 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.scope - scope of the metrics (eg. handler name) to separate metrics of components with
the same implementation but different scope.public 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 interface SolrMetricProducerclose in class AuditLoggerPluginIOExceptionCopyright © 2000-2020 Apache Software Foundation. All Rights Reserved.