|Maintainer Contact:||firstname.lastname@example.org (Ilyas Bakouch)|
|Package Create Date:||2016-04-26|
|Package Last Update:||2019-04-09|
|Last Refreshed:||2022-08-02 15:00:19|
|Total Open Issues:||0|
This package adds the tail command to Laravel 5. This package works for daily and single logs and has support for tailing local and the remote logs.
You can install the package via composer:
composer require isbkch/laravel5-tail
You must install this service provider:
// config/app.php 'providers' => [ ... Isbkch\Tail\TailServiceProvider::class, ... ];
If you're planning on tailing remote logs you must publish the config file with this command:
php artisan vendor:publish --provider="Isbkch\Tail\TailServiceProvider"
A file named
tail.php will be created in the config directory. The options you can set in the file should be self-explanatory.
PS: You can get the username from the .env file
return [ 'connections' => [ /* * The environment name. You can use this value in the tail command. */ 'production' => [ // Hostname of the server where the logs are located 'host' => '', // Username to be used when connecting to the server where the logs are located 'user' => env('TAIL_USERNAME', 'isbkch'), // Full path to the directory where the logs are located 'logDirectory' => '', ], // Change it to 'true' if you have grc (Generic Colouriser) installed in your system // To install grc on Debian based: sudo apt-get install grc 'grc' => 'false' ], ];
To tail the local log you can use this command:
php artisan tail
By default the last 20 lines will be shown. You can change that number by using the
php artisan tail --lines=50
To tail a remote log you must first specify
logDirectory in the config-file. After you've done that you can tail the remote logs by specify the environment as an argument.
php artisan tail production
The MIT License (MIT). Please see License File for more information.