You are here

public function TestLogger::log in TMGMT Translator Smartling 8.3

Same name and namespace in other branches
  1. 8.4 vendor/psr/log/Psr/Log/Test/TestLogger.php \Psr\Log\Test\TestLogger::log()

@inheritdoc

Overrides LoggerInterface::log

File

vendor/psr/log/Psr/Log/Test/TestLogger.php, line 69

Class

TestLogger
Used for testing purposes.

Namespace

Psr\Log\Test

Code

public function log($level, $message, array $context = []) {
  $record = [
    'level' => $level,
    'message' => $message,
    'context' => $context,
  ];
  $this->recordsByLevel[$record['level']][] = $record;
  $this->records[] = $record;
}