-
-
Notifications
You must be signed in to change notification settings - Fork 0
OutputFormatLogger
github-actions edited this page Apr 22, 2026
·
1 revision
Formats PSR-3 log messages for the DevTools console runtime.
The logger routes error-related levels to stderr, expands command context through the configured processor, and can switch between tagged text output and structured JSON output depending on CLI flags or detected agent execution.
- Full name:
\FastForward\DevTools\Console\Logger\OutputFormatLogger - This class is marked as final and can't be subclassed
- This class implements:
LoggerInterface - This class is a Final class
Creates a new console logger instance.
public __construct(\Symfony\Component\Console\Input\ArgvInput $input, \Symfony\Component\Console\Output\ConsoleOutputInterface $output, \Psr\Clock\ClockInterface $clock, \Ergebnis\AgentDetector\Detector $agentDetector, \FastForward\DevTools\Console\Logger\Processor\ContextProcessorInterface $contextProcessor, \FastForward\DevTools\Console\Output\GithubActionOutput $githubActionOutput): mixedParameters:
| Parameter | Type | Description |
|---|---|---|
$input |
\Symfony\Component\Console\Input\ArgvInput | the CLI input instance used to inspect runtime options |
$output |
\Symfony\Component\Console\Output\ConsoleOutputInterface | the console output instance used for writing log messages |
$clock |
\Psr\Clock\ClockInterface | provides timestamps for rendered log entries |
$agentDetector |
\Ergebnis\AgentDetector\Detector | detects agent-oriented execution environments |
$contextProcessor |
\FastForward\DevTools\Console\Logger\Processor\ContextProcessorInterface | expands command input and output metadata |
$githubActionOutput |
\FastForward\DevTools\Console\Output\GithubActionOutput | emits GitHub Actions annotations when supported |
Logs a message at the specified level.
public log(mixed $level, string|\Stringable $message, array<string,mixed> $context = []): voidThis method MUST format the message before writing it to the console. Error-related levels SHALL be directed to the error output stream. All other levels SHALL be directed to the standard output stream.
Parameters:
| Parameter | Type | Description |
|---|---|---|
$level |
mixed | the log level identifier |
$message |
string|\Stringable | the log message, optionally containing PSR-3 placeholders |
$context |
array<string,mixed> | context data used for placeholder interpolation and JSON output |