liplex / central-logging-bundle
Symfony Central Logging Bundle
Installs: 186
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Type:symfony-bundle
Requires
- php: >=5.6
- doctrine/dbal: <2.5||~2.5
- sensio/buzz-bundle: ^1.0
- symfony/console: ~2.8||~3.0||~3.1
- symfony/framework-bundle: ~2.8||~3.0||~3.1
- symfony/monolog-bundle: ~2.4
This package is not auto-updated.
Last update: 2021-11-17 22:56:10 UTC
README
Installation
Composer
$ composer require liplex/central-logging-bundle
AppKernel
<?php
public function registerBundles()
{
$bundles = array(
// ...
new Liplex\CentralLoggingBundle\LiplexCentralLoggingBundle(),
new Sensio\Bundle\BuzzBundle\SensioBuzzBundle(),
// ...
);
}
Usage
<?php
public function myLoggingAction()
{
$logger = $this->get('central-logging');
$logger->info("Successful data import");
}
Dispatch
All logs are written into a local sqlite database for performance reason. You can issue the following command to send the logs to the central logging.
$ php app/console liplex:central-logging:dispatch
Best activate this in a cron which runs every minute.