PHP code example of gtcrais / application-log-parser
1. Go to this page and download the library: Download gtcrais/application-log-parser 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/ */
gtcrais / application-log-parser example snippets
'platforms' => [
'laravel' => GTCrais\ApplicationLogParser\Parsers\Laravel\LaravelLogParser::class,
'customPlatform' => CustomVendor\CustomNamespace\CustomLogParser::class,
]
use GTCrais\ApplicationLogParser\Facades\LogParser;
$logEntriesCollection = LogParser::get();
$logEntriesCollection = LogParser::setPlatform('customPlatform')->setLogPath('path/to/log/file/logfile.log')->get();
$logEntriesCollection = LogParser::setSortProperty('customProperty')->setSortDirection('asc')->get();
$logEntriesCollection = LogParser::disableDefaultSorting()->sortBy('propertyOrCallback')->get();