8.5.x FormBase.php FormBase::logger($channel)
8.0.x FormBase.php FormBase::logger($channel)
8.1.x FormBase.php FormBase::logger($channel)
8.2.x FormBase.php FormBase::logger($channel)
8.3.x FormBase.php FormBase::logger($channel)
8.4.x FormBase.php FormBase::logger($channel)
8.6.x FormBase.php FormBase::logger($channel)

Gets the logger for a specific channel.

This method exists for backward-compatibility between FormBase and LoggerChannelTrait. Use LoggerChannelTrait::getLogger() instead.

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 the given channel.

3 calls to FormBase::logger()
BlockContentForm::save in core/modules/block_content/src/BlockContentForm.php
Form submission handler for the 'save' action.
BlockContentTypeForm::save in core/modules/block_content/src/BlockContentTypeForm.php
Form submission handler for the 'save' action.
CommentForm::save in core/modules/comment/src/CommentForm.php
Form submission handler for the 'save' action.
1 method overrides FormBase::logger()
EntityDeleteFormTrait::logger in core/lib/Drupal/Core/Entity/EntityDeleteFormTrait.php
Gets the logger for a specific channel.

File

core/lib/Drupal/Core/Form/FormBase.php, line 223

Class

FormBase
Provides a base class for forms.

Namespace

Drupal\Core\Form

Code

protected function logger($channel) {
  return $this
    ->getLogger($channel);
}