You are here

public function AuditLogStorage::addStorageBackend in Audit Log 8

Same name and namespace in other branches
  1. 8.2 src/AuditLogStorage.php \Drupal\audit_log\AuditLogStorage::addStorageBackend()

Adds a log destination to the processing pipeline.

Parameters

\Drupal\audit_log\StorageBackend\StorageBackendInterface $storage_backend: The logging destination to write events to.

int $priority: A priority specification for the storage backend s.

Must be a positive integer.

Lower number storage backend s are processed before higher number storage backend s.

File

src/AuditLogStorage.php, line 45

Class

AuditLogStorage
Writes audit log events to enabled logging destinations.

Namespace

Drupal\audit_log

Code

public function addStorageBackend(StorageBackendInterface $storage_backend, $priority = 0) {
  $this->storage_backends[$priority][] = $storage_backend;
}