You are here

private function NewRelicLogger::getSeverityName in New Relic 8

Same name and namespace in other branches
  1. 2.x src/Logger/NewRelicLogger.php \Drupal\new_relic_rpm\Logger\NewRelicLogger::getSeverityName()
  2. 2.0.x src/Logger/NewRelicLogger.php \Drupal\new_relic_rpm\Logger\NewRelicLogger::getSeverityName()

Get a human readable severity name for an RFC log level.

Parameters

int $level: The RFC 5424 log level.

Return value

string The human readable severity name.

1 call to NewRelicLogger::getSeverityName()
NewRelicLogger::log in src/Logger/NewRelicLogger.php
Logs with an arbitrary level.

File

src/Logger/NewRelicLogger.php, line 95

Class

NewRelicLogger
A Logger that allows sending messages to the New Relic API.

Namespace

Drupal\new_relic_rpm\Logger

Code

private function getSeverityName($level) {
  $levels = RfcLogLevel::getLevels();
  if (isset($levels[$level])) {
    return $levels[$level]
      ->getUntranslatedString();
  }
  return 'Unknown';
}