mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-13 13:54:23 +00:00
adding a logger for chill
The logger log messages to channel "chill". The name of the service is `chill.main.logger`
This commit is contained in:
parent
b0f4297948
commit
7c1698ed98
@ -34,6 +34,7 @@ class ChillMainExtension extends Extension implements PrependExtensionInterface
|
|||||||
|
|
||||||
$loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
|
$loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
|
||||||
$loader->load('services.yml');
|
$loader->load('services.yml');
|
||||||
|
$loader->load('services/logger.yml');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function prepend(ContainerBuilder $container)
|
public function prepend(ContainerBuilder $container)
|
||||||
@ -82,5 +83,10 @@ class ChillMainExtension extends Extension implements PrependExtensionInterface
|
|||||||
|
|
||||||
)
|
)
|
||||||
));
|
));
|
||||||
|
|
||||||
|
//add a channel to log app events
|
||||||
|
$container->prependExtensionConfig('monolog', array(
|
||||||
|
'channels' => array('chill')
|
||||||
|
));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
4
Resources/config/services/logger.yml
Normal file
4
Resources/config/services/logger.yml
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
services:
|
||||||
|
chill.main.logger:
|
||||||
|
# a logger to log events from the app (deletion, remove, etc.)
|
||||||
|
alias: monolog.logger.chill
|
Loading…
x
Reference in New Issue
Block a user