PHP code example of kingsoft / monolog-handler
1. Go to this page and download the library: Download kingsoft/monolog-handler 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/ */
kingsoft / monolog-handler example snippets
$log = new Monolog\Logger( SETTINGS['log']['name'] );
$log->pushHandler(
new \Kingsoft\MonologHandler\CronRotatingFileHandler(
SETTINGS['log']['location'] . '/' . SETTINGS['log']['name'] . '_info.log',
Monolog\Level::fromName( SETTINGS['log']['level'],
SETTINGS['logrotate'] )
)
);