PHP code example of v.chetkov / logger

1. Go to this page and download the library: Download v.chetkov/logger 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/ */

    

v.chetkov / logger example snippets


$logger = LoggerServiceFactory::getInstance()->build('test');

$logger->debug('Тест уровня логгирования: DEBUG');



return [
    // Входные параметры для MongoDB\Client
    'uri' => 'mongodb://127.0.0.1/',
    'uri_options' => [],
    'driver_options' => [],

    // Входные параметры Implementation\Mongo\MongoLogger
    'database' => 'logs',
    'date_format_for_grouping' => 'Y-m',
];



return [
    'path' => LOGGER_ROOT . '/logs',
    'date_format_for_grouping' => 'Y-m',
];