Skip to content

LogLevelOutputFormatter

github-actions edited this page Apr 22, 2026 · 1 revision

Defines additional console styles for log level tags.

This formatter extends the default Symfony output formatter and SHALL register a predefined set of styles mapped to common PSR-3 log levels. These styles MAY be used by console messages that wrap content in tags such as "", "", or "".

The formatter MUST enable decorated output so that registered styles can be rendered by compatible console outputs. Consumers SHOULD use this formatter when log messages are emitted with tag names that correspond to log levels.


  • Full name: \FastForward\DevTools\Console\Formatter\LogLevelOutputFormatter
  • Parent class: OutputFormatter
  • This class is marked as final and can't be subclassed
  • This class is a Final class

Methods

__construct

Initializes the formatter with predefined styles for log levels.

public __construct(): mixed

The registered styles SHALL provide visual differentiation for the supported log levels. Implementations MAY extend this formatter if additional custom styles are required, but this constructor MUST preserve the base formatter behavior by delegating initialization to the parent constructor.


Clone this wiki locally