public function LoggerChannelPartFactory::create in Purge 8.3
Create a channel part instance.
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.
Return value
\Drupal\purge\Logger\LoggerChannelPartInterface The channel part instance.
Overrides LoggerChannelPartFactoryInterface::create
File
- src/
Logger/ LoggerChannelPartFactory.php, line 33
Class
- LoggerChannelPartFactory
- Provides a factory that creates LoggerChannelPartInterface instances.
Namespace
Drupal\purge\LoggerCode
public function create($id, array $grants = []) {
return new LoggerChannelPart($this->loggerChannelPurge, $id, $grants);
}