PHP code example of itk-dev / monolog-db-bundle

1. Go to this page and download the library: Download itk-dev/monolog-db-bundle library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

itk-dev / monolog-db-bundle example snippets


    public function registerBundles()
    {
        $bundles = [
            …,
            new ItkDev\MonologDbBundle\ItkDevMonologDbBundle(),
            …
        ];

        …
    }

…
$logger = $container->get('monolog.logger.db');
$logger->info($message);
…

$logger->info($message, [
  'type' => 'my_log_entry',
]);