You are here

public function LoggerTrait::getLogger in Search API 8

Retrieves the logger.

Return value

\Psr\Log\LoggerInterface The logger.

File

src/LoggerTrait.php, line 27

Class

LoggerTrait
Provides helper methods for logging with dependency injection.

Namespace

Drupal\search_api

Code

public function getLogger() {
  return $this->logger ?: \Drupal::service('logger.channel.search_api');
}