You are here

public function ComponentsInfo::logWarning in Components! 8.2

Logs exceptional occurrences that are not errors.

Example: Use of deprecated APIs, poor use of an API, undesirable things that are not necessarily wrong.

@internal

Parameters

string $message: The warning to log.

mixed[] $context: Any additional context to pass to the logger.

1 call to ComponentsInfo::logWarning()
ComponentsInfo::findComponentsInfo in src/Template/ComponentsInfo.php
Finds component info from the given extension list.

File

src/Template/ComponentsInfo.php, line 363

Class

ComponentsInfo
Loads info about components defined in themes or modules.

Namespace

Drupal\components\Template

Code

public function logWarning($message, array $context = []) {
  if (!$this->cache
    ->get('components:suppressWarnings')) {
    $this
      ->getLogger('components')
      ->warning($message, $context);
  }
}