symfony / monolog-bundle

Symfony Monolog Bundle
symfony.com
MIT License
2.88k stars 229 forks source link

Allow using `OutputInterface::VERBOSITY_*` constants in PHP config #439

Open HeahDude opened 2 years ago

HeahDude commented 2 years ago

While trying to improve some configuration blocks in Symfony docs, I found out that it was not possible to use constants for the verbosity levels of the console handler. I think it's missing now that we tend to spread PHP config files such as config/packages/monolog.php.

Before this patch one gets the following exception:

Symfony\Component\Config\Definition\Exception\InvalidConfigurationException: Unrecognized options "32, 128" under "monolog.handlers.console.verbosity_levels". Available options are "VERBOSITY_DEBUG", "VERBOSITY_NORMAL", "VERBOSITY_QUIET", "VERBOSITY_VERBOSE", "VERBOSITY_VERY_VERBOSE".