protected FormBase::logger($channel)
Gets the logger for a specific channel.
string $channel: The name of the channel.
\Psr\Log\LoggerInterface The logger for this channel.
protected function logger($channel) {
if (!$this->loggerFactory) {
$this->loggerFactory = $this->container()->get('logger.factory');
}
return $this->loggerFactory->get($channel);
}
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Form!FormBase.php/function/FormBase::logger/8.1.x