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\CICode
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));
}