PHP code example of jeremycurny / monolog-mysqlhandler

1. Go to this page and download the library: Download jeremycurny/monolog-mysqlhandler 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/ */

    

jeremycurny / monolog-mysqlhandler example snippets


use Monolog\Handler\MysqlHandler;
use Monolog\Logger;

$logger = new Logger("myLogger");
$tableName = "logger";

$logger->pushHandler(new MysqlHandler($pdo, $tableName, Logger::DEBUG));

$logger->info("This is my first log !");