You are here

private function Stdout::getUserName in log_stdout 8.2

1 call to Stdout::getUserName()
Stdout::log in src/Logger/Stdout.php

File

src/Logger/Stdout.php, line 95

Class

Stdout

Namespace

Drupal\log_stdout\Logger

Code

private function getUserName(array $context) {
  if (isset($context['user']) && !empty($context['user'])) {
    return $context['user']
      ->getAccountName();
  }
  return 'anonymous';
}