Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. SimplePsrFileLogger.php

function SimplePsrFileLogger::log

@psalm-suppress MoreSpecificImplementedParamType

Overrides LoggerTrait::log

File

vendor/open-telemetry/sdk/Logs/SimplePsrFileLogger.php, line 31

Class

SimplePsrFileLogger

Namespace

OpenTelemetry\SDK\Logs

Code

public function log($level, $message, array $context = []) : void {
    $level = strtolower((string) $level);
    if (!in_array($level, self::getLogLevels(), true)) {
        throw new InvalidArgumentException(sprintf('Invalid Log level: "%s"', $level));
    }
    file_put_contents($this->filename, $this->formatLog((string) $level, (string) $message, $context), FILE_APPEND);
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal