Download the PHP package gtcrais/application-log-parser without Composer
On this page you can find all versions of the php package gtcrais/application-log-parser. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download gtcrais/application-log-parser
More information about gtcrais/application-log-parser
Files in gtcrais/application-log-parser
Download gtcrais/application-log-parser
More information about gtcrais/application-log-parser
Files in gtcrais/application-log-parser
Vendor gtcrais
Package application-log-parser
Short Description Application Log Parser
License MIT
Package application-log-parser
Short Description Application Log Parser
License MIT
Keywords Application Log Parser
Please rate this library. Is it a good library?
Informations about the package application-log-parser
Application Log Parser
Application Log Parser is a Laravel package for parsing various application logs. By default it ships with parser for Laravel 4.2+ and WordPress.
Requirements
- PHP 7.0+
- Laravel 5.5+ (it may work on lower versions of Laravel, but it hasn't been tested)
Installation
- add
"gtcrais/application-log-parser": "1.1.*"
to yourcomposer.json
and runcomposer update
- for Laravel
<=5.4
addGTCrais\ApplicationLogParser\LogParserServiceProvider::class,
to providers array in/config/app.php
and runcomposer dump-autoload
Note: this package has not been tested with Laravel versions prior to5.5
- optionally, run
php artisan vendor:publish --provider=GTCrais\ApplicationLogParser\LogParserServiceProvider
API
Method | Default | Description |
---|---|---|
get() |
- | Gets a collection of application logs after parsing the log file. |
setPlatform($platform) |
laravel |
Sets the platform whose logs you're parsing. At the moment only Laravel platform is supported, but more platforms are in the works. You can also write and register your own platform and its log parser in the config file, described below. |
setLogPath($logPath) |
/storage/logs/laravel.log |
Sets path to the log file. |
setSortDirection($sortDirection) |
desc |
Accepts desc or asc . |
setSortProperty($sortProperty) |
date |
Sets the property by which the application logs should be sorted. |
disableDefaultSorting() |
- | Disables the built-in sorting, in case you wish to manually sort the returned collection. |
Writing a custom platform log parser
- publish the Application Log Parser config file by running
php artisan vendor:publish --provider=GTCrais\ApplicationLogParser\LogParserServiceProvider
- write your log parser class. It must implement
GTCrais\ApplicationLogParser\Contracts\LogParserContract
and return a Collection of Log Entries. EachLogEntry
must extendGTCrais\ApplicationLogParser\LogEntries\BaseLogEntry
- finally, register your platform and its log parser in the config file:
For more details check out GTCrais\ApplicationLogParser\Parsers\LaravelLogParser
and GTCrais\ApplicationLogParser\LogEntries\BaseLogEntry
classes.
Usage examples
Note
This package uses some parts of code for parsing Laravel logs from JackieDo/Laravel-Log-Reader
.
License
Application Log Parser is open-sourced software licensed under the MIT license.
All versions of application-log-parser with dependencies
PHP Build Version
Package Version
Requires
php Version
>=7.0.0
The package gtcrais/application-log-parser contains the following files
Loading the files please wait ....