function Drupal::logger
Returns a channel logger object.
Parameters
string $channel: The name of the channel. Can be any string, but the general practice is to use the name of the subsystem calling this.
Return value
\Psr\Log\LoggerInterface The logger for this channel.
15 calls to Drupal::logger()
- ConfigImporterBatch::finish in core/
lib/ Drupal/ Core/ Config/ Importer/ ConfigImporterBatch.php - Finish batch.
- EntityDisplayBase::getLogger in core/
lib/ Drupal/ Core/ Entity/ EntityDisplayBase.php - Provides the 'system' channel logger service.
- locale_translate_batch_finished in core/
modules/ locale/ locale.bulk.inc - Implements callback_batch_finished().
- locale_translation_http_check in core/
modules/ locale/ locale.batch.inc - Check if remote file exists and when it was last updated.
- ProcessedText::logger in core/
modules/ filter/ src/ Element/ ProcessedText.php - Wraps a logger channel.
File
-
core/
lib/ Drupal.php, line 675
Class
- Drupal
- Static Service Container wrapper.
Code
public static function logger($channel) {
return static::getContainer()->get('logger.factory')
->get($channel);
}