Download the PHP package glen/console-logger-serviceprovider without Composer
On this page you can find all versions of the php package glen/console-logger-serviceprovider. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download glen/console-logger-serviceprovider
More information about glen/console-logger-serviceprovider
Files in glen/console-logger-serviceprovider
Package console-logger-serviceprovider
Short Description Pimple ConsoleLogger ServiceProvider
License MIT
Informations about the package console-logger-serviceprovider
ConsoleLoggerServiceProvider
This service provider makes it easy to show log messages from services in the console,
without having to inject an instance of OutputInterface
into the services. This
requires version >=2.4 of Symfony Components. More info about the change is at the
Symfony Blog.
In your console application, you can now do something like this:
You will still use the normal OutputInterface
instance for command feedback
in your commands, but you will now also get output from anything your services
are logging.
The minimum logging level at which this handler will be triggered depends on the verbosity setting of the console output. The default mapping is:
OutputInterface::VERBOSITY_NORMAL
will show allWARNING
and higher logsOutputInterface::VERBOSITY_VERBOSE
(-v
) will show allNOTICE
and higher logsOutputInterface::VERBOSITY_VERY_VERBOSE
(-vv
) will show allINFO
and higher logsOutputInterface::VERBOSITY_DEBUG
(-vvv
) will show all DEBUG and higher logs, i.e. all logs
This mapping can be customized with the logger.console_logger.handler.verbosity_level_map
constructor parameter:
All versions of console-logger-serviceprovider with dependencies
monolog/monolog Version ^1.23|^2.3
pimple/pimple Version ^3.0
symfony/console Version ^2.8|^3.0|^4.0|^5.0|^6.0
symfony/monolog-bridge Version ^3.3|^4.0|^5.0|^6.0