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

Breadcrumb

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

function GithubActionReporter::log

3 calls to GithubActionReporter::log()
GithubActionReporter::debug in vendor/symfony/console/CI/GithubActionReporter.php
Output a debug log using the Github annotations format.
GithubActionReporter::error in vendor/symfony/console/CI/GithubActionReporter.php
Output an error using the Github annotations format.
GithubActionReporter::warning in vendor/symfony/console/CI/GithubActionReporter.php
Output a warning using the Github annotations format.

File

vendor/symfony/console/CI/GithubActionReporter.php, line 83

Class

GithubActionReporter
Utility class for Github actions.

Namespace

Symfony\Component\Console\CI

Code

private function log(string $type, string $message, ?string $file = null, ?int $line = null, ?int $col = null) : void {
    // Some values must be encoded.
    $message = strtr($message, self::ESCAPED_DATA);
    if (!$file) {
        // No file provided, output the message solely:
        $this->output
            ->writeln(\sprintf('::%s::%s', $type, $message));
        return;
    }
    $this->output
        ->writeln(\sprintf('::%s file=%s,line=%s,col=%s::%s', $type, strtr($file, self::ESCAPED_PROPERTIES), strtr($line ?? 1, self::ESCAPED_PROPERTIES), strtr($col ?? 0, self::ESCAPED_PROPERTIES), $message));
}

API Navigation

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