Download the PHP package adrenalinkin/monolog-autowire-bundle without Composer
On this page you can find all versions of the php package adrenalinkin/monolog-autowire-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download adrenalinkin/monolog-autowire-bundle
More information about adrenalinkin/monolog-autowire-bundle
Files in adrenalinkin/monolog-autowire-bundle
Package monolog-autowire-bundle
Short Description Provides autowiring for the loggers registered by symfony/monolog-bundle
License MIT
Informations about the package monolog-autowire-bundle
Monolog Autowire Bundle
Introduction
Bundle provides the ability to connect loggers registered in MonologBundle
through the standard autowire
mechanism.
The goal is achieved thanks to auto-generated classes of loggers. Each class decorates one object of one
of the registered monolog
channel.
Also available is the second way to achieve the goal - using the LoggerCollection
.
If the requested channel does not exist - will be selected fallback logger
.
As fallback logger
will be used service, which referenced by @Psr\Log\LoggerInterface
.
In that case where logger
was not registered in service container will be returned instance of Psr\Log\NullLogger
.
Important: Bundle will work properly in the absence of MonologBundle
in the project.
In that case LoggerCollection
will always return a fallback value.
Installation
Step 1: Download the Bundle
Open a command console, enter your project directory and execute the following command to download the latest stable version of this bundle:
is command requires you to have Composer install globally.
Step 2: Enable the Bundle
Then, enable the bundle by updating your app/AppKernel.php
file to enable the bundle:
Configuration
To start using bundle you don't need to define some additional configuration. All parameters has values by default:
Usage
Suppose our project has the following configuration MonologBundle
:
Use through auto-generated loggers
Class names are generated based on the channel name. All non-alphanumeric values are deleted,
and the name is converted to the format of CamelCase
. All classes begin with Channel
and end withLogger
.
Use through collection of loggers
License
All versions of monolog-autowire-bundle with dependencies
psr/log Version ^1.0
symfony/config Version ^3.4||^4.0
symfony/dependency-injection Version ^3.4||^4.0
symfony/finder Version ^3.4||^4.0
symfony/http-kernel Version ^3.4||^4.0