protected function LoggerChannel::sortLoggers

protected LoggerChannel::sortLoggers()

Sorts loggers according to priority.

Return value

array An array of sorted loggers by priority.

File

core/lib/Drupal/Core/Logger/LoggerChannel.php, line 176

Class

LoggerChannel
Defines a logger channel that most implementations will use.

Namespace

Drupal\Core\Logger

Code

protected function sortLoggers() {
  $sorted = array();
  krsort($this->loggers);

  foreach ($this->loggers as $loggers) {
    $sorted = array_merge($sorted, $loggers);
  }
  return $sorted;
}

© 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!Logger!LoggerChannel.php/function/LoggerChannel::sortLoggers/8.1.x