Skip to content

This package is used for logging every incoming http route request.

Notifications You must be signed in to change notification settings

sagar290/laravel-logable

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Laravel Logable is a simple way to log http request in your Laravel application.

Requirements

php >= 7.4

Laravel version >= 6.0

Installation

composer require sagar290/laravel-logable

You need add this configuration in config/logging.php file in channels array.

'channels' => [
    .....
    'logable' => [
        'driver' => 'daily',
        'path' => storage_path('logs/logable.log'),
        'level' => 'debug',
    ],
]

Add this middleware to your app/Http/Kernel.php file.

protected $middleware = [
    ...
    \Sagar290\Logable\Middleware\RouteLogMiddleware::class,
];

Publish configuration file.

php artisan vendor:publish --provider="Sagar290\Logable\LogableServiceProvider" --tag="config"

Commands

monitoring logs

php artisan logs:monitor

image laravel logable

This will live monitor all incoming requests and log them to the log file.

Clear logs

php artisan logs:clear

This will clear all logs.

Conclusion

Please feel free raise an issue if you have problem. Also, feel free to star this repository on Github. Contribute to this project by making a pull request.