ConsoleLogger
final class ConsoleLogger
Supports all operations related to writing output to console.
Constants
| BG_BLACK |
Value for background black. |
| BG_RED |
Value for background red. |
| BG_GREEN |
Value for background green. |
| BG_YELLOW |
Value for background yellow. |
| BG_BLUE |
Value for background blue. |
| BG_MAGENTA |
Value for background magenta. |
| BG_CYAN |
Value for background cyan. |
| BG_LIGHT_GREY |
Value for background light grey |
| TEXT_BLACK |
Value for text black. |
| TEXT_WHITE |
Value for text white. |
| TEXT_DARK_GREY |
Value for text dark grey. |
| TEXT_RED |
Value for text red. |
| TEXT_GREEN |
Value for text green. |
| TEXT_BROWN |
Value for text brown. |
| TEXT_YELLOW |
Value for text yellow. |
| TEXT_BLUE |
Value for text blue. |
| TEXT_MAGENTA |
Value for text magenta. |
| TEXT_CYAN |
Value for text cyan. |
| TEXT_LIGHT_CYAN |
Value for text light cyan. |
| TEXT_LIGHT_GREY |
Value for text light grey. |
| TEXT_LIGHT_RED |
Value for text light red. |
| TEXT_LIGHT_GREEN |
Value for text light green. |
| TEXT_LIGHT_BLUE |
Value for text light blue. |
| TEXT_LIGHT_MAGENTA |
Value for text light magenta. |
Properties
| static private OutputInterface|null | $output | Supports ability to log information to console. |
Methods
Performs actual action of writing output to console with specified background color, text color, and message.
Fixes background color when invalid background color is set for originating message.
Checks if value for background color or text color matches list of available constants.
Generates output messages for console commands.
Enables output for symfony.
Details
at line 78
static private void
consoleLog(string $output)
Performs actual action of writing output to console with specified background color, text color, and message.
at line 91
static private string
fixBackgroundColor(string $level)
Fixes background color when invalid background color is set for originating message.
at line 134
static private bool
hasConstant(string $value, string $type)
Checks if value for background color or text color matches list of available constants.
at line 166
static void
log(string $message, string $level = Logger::INFO, string $background = self::BG_GREEN, string $text = self::TEXT_LIGHT_GREY)
Generates output messages for console commands.
at line 215
static void
setOutput(OutputInterface $output)
Enables output for symfony.