You are here

public static function Drupal::logger in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/lib/Drupal.php \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.

10 calls to Drupal::logger()
DbLogFormInjectionTest::setUp in core/modules/dblog/src/Tests/DbLogFormInjectionTest.php
Performs setup tasks before each individual test method is run.
EntityDisplayBase::getLogger in core/lib/Drupal/Core/Entity/EntityDisplayBase.php
Provides the 'system' channel logger service.
file_unmanaged_copy in core/includes/file.inc
Copies a file to a new location without invoking the file API.
file_unmanaged_delete in core/includes/file.inc
Deletes a file without database changes or hook invocations.
locale_translate_batch_finished in core/modules/locale/locale.bulk.inc
Implements callback_batch_finished().

... See full list

File

core/lib/Drupal.php, line 664
Contains \Drupal.

Class

Drupal
Static Service Container wrapper.

Code

public static function logger($channel) {
  return static::getContainer()
    ->get('logger.factory')
    ->get($channel);
}