You are here

public function LoggerServiceInterface::setChannel in Purge 8.3

Add or update a channel part and its permissions.

Parameters

string $id: The identifier of the channel part.

int[] $grants: Unassociative array of RFC 5424 log types. Each passed type grants the channel permission to log that type of message, without specific permissions the logger will stay silent for that type.

Grants available:

Throws

\LogicException Thrown when the given id is empty or otherwise invalid.

\LogicException Thrown when any given grant isn't known or otherwise invalid.

1 method overrides LoggerServiceInterface::setChannel()
LoggerService::setChannel in src/Logger/LoggerService.php
Add or update a channel part and its permissions.

File

src/Logger/LoggerServiceInterface.php, line 94

Class

LoggerServiceInterface
Describes logging services to purge and its submodules, via a single channel.

Namespace

Drupal\purge\Logger

Code

public function setChannel($id, array $grants = []);