public function LoggerChannelPart::log in Purge 8.3
Prefixes messages with the channel ID so that the origin can be traced.
Overrides LoggerChannelPartInterface::log
8 calls to LoggerChannelPart::log()
- LoggerChannelPart::alert in src/
Logger/ LoggerChannelPart.php - Logs only when granted \Drupal\Core\Logger\RfcLogLevel::EMERGENCY.
- LoggerChannelPart::critical in src/
Logger/ LoggerChannelPart.php - Logs only when granted \Drupal\Core\Logger\RfcLogLevel::CRITICAL.
- LoggerChannelPart::debug in src/
Logger/ LoggerChannelPart.php - Logs only when granted \Drupal\Core\Logger\RfcLogLevel::DEBUG.
- LoggerChannelPart::emergency in src/
Logger/ LoggerChannelPart.php - Logs only when granted \Drupal\Core\Logger\RfcLogLevel::EMERGENCY.
- LoggerChannelPart::error in src/
Logger/ LoggerChannelPart.php - Logs only when granted \Drupal\Core\Logger\RfcLogLevel::ERROR.
File
- src/
Logger/ LoggerChannelPart.php, line 155
Class
- LoggerChannelPart
- Provides a subchannel whichs logs to a single main channel with permissions.
Namespace
Drupal\purge\LoggerCode
public function log($level, $message, array $context = []) {
$context += [
'@purge_channel_part' => $this->id,
];
$message = '@purge_channel_part: ' . $message;
$this->loggerChannelPurge
->log($level, $message, $context);
}