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:
- \Drupal\Core\Logger\RfcLogLevel::EMERGENCY
- \Drupal\Core\Logger\RfcLogLevel::ALERT
- \Drupal\Core\Logger\RfcLogLevel::CRITICAL
- \Drupal\Core\Logger\RfcLogLevel::ERROR
- \Drupal\Core\Logger\RfcLogLevel::WARNING
- \Drupal\Core\Logger\RfcLogLevel::NOTICE
- \Drupal\Core\Logger\RfcLogLevel::INFO
- \Drupal\Core\Logger\RfcLogLevel::DEBUG.
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\LoggerCode
public function setChannel($id, array $grants = []);