PHP code example of bbhlondon / log-utilities

1. Go to this page and download the library: Download bbhlondon/log-utilities 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/ */

    

bbhlondon / log-utilities example snippets




use BBHLondon\LogUtilities\LogUtilities;

$logger = new BBHLondon\LogUtilities\LogUtilities;
$logger->scanDir('/var/log/apache/site1-access.log');
$logger->scanDir('/var/log/apache/site2-access.log');
$logger->find('/password-reset-request');
$logger->scan();
$logger->sortByDate();
$logger->dateFrom('2016-01-01 00:00:00');
$logger->dateTo('2016-02-01 23:59:59');
$logger->output('dir/export.log');