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

Breadcrumb

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

function EventLogger::trace

Overrides Tracer::trace

File

vendor/phpunit/phpunit/src/Logging/EventLogger.php, line 40

Class

EventLogger
@no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit

Namespace

PHPUnit\Logging

Code

public function trace(Event $event) : void {
    $telemetryInfo = $this->telemetryInfo($event);
    $indentation = PHP_EOL . str_repeat(' ', strlen($telemetryInfo));
    $lines = preg_split('/\\r\\n|\\r|\\n/', $event->asString());
    $flags = FILE_APPEND;
    if (!(PHP_OS_FAMILY === 'Windows' || PHP_OS_FAMILY === 'Darwin') || $this->path !== 'php://stdout') {
        $flags |= LOCK_EX;
    }
    file_put_contents($this->path, $telemetryInfo . implode($indentation, $lines) . PHP_EOL, $flags);
}

API Navigation

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