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

Last update: Feb 5, 2022

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

To register service provider you need to add this line in your config/app.php file.

'providers' => [
    ...
    Sagar290\Logable\LogableServiceProvider::class,
],

also, 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.

GitHub

https://github.com/sagar290/laravel-logable
You might also like...

Kalibrant - a package that provides a simple way to manage your models settings

Kalibrant - a package that provides a simple way to manage your models settings

Introduction For your laravel 9.x applications, Kalibrant is a package that provides a simple way to manage your models settings. It is a simple way t

Jun 18, 2022

This package aims to help you standardize all your API responses in a simple and structured way.

Laravel API Response This package aims to help you standardize all your API responses in a simple and structured way. By default, the stucture of the

Jun 18, 2022

Record the change log from models in Laravel

This package will help you understand changes in your Eloquent models, by providing information about possible discrepancies and anomalies that could

Jun 28, 2022

laravel zibal - transaction request package for zibal

laravel zibal - transaction request package for zibal

laravel zibal transaction request package for zibal Getting Started To get a local copy up and running follow these simple steps. Installation You can

Jan 10, 2022

This package can use form request just as Laravel do.

Lumen Form Request This package can use form request just as Laravel do. Installation Install by composer $ composer require chhw/form-request In

Nov 17, 2021

đź––Repository Pattern in Laravel. The package allows to filter by request out-of-the-box, as well as to integrate customized criteria and any kind of filters.

đź––Repository Pattern in Laravel. The package allows to filter by request out-of-the-box, as well as to integrate customized criteria and any kind of filters.

Repository Repository Pattern in Laravel. The package allows to filter by request out-of-the-box, as well as to integrate customized criteria and any

Jun 8, 2022

Log user authentication actions in Laravel.

Laravel Auth Log The laravel-auth-log package will log all the default Laravel authentication events (Login, Attempting, Lockout, etc.) to your databa

Apr 18, 2022

Log executed Laravel SQL queries and their line number and more

A lightweight laravel package for logging executed SQL queries, line number and more

Jun 2, 2022

Laravel Email Audit Log

This service provider will monitor all emails that has been sent out of your system. Sent emails will be stored in email_audit_log table

Apr 13, 2022
Comments
  • 1. Specific path logging config

    This is a minor feature request, Sometimes I need to debug only specific some routes so if I can specify some of the routing paths in the config and this package only log those routes it will be a good option for debugging

    Reviewed by hashemirafsan at 2022-02-04 06:57
  • 2. Configurable option need to collect the logs

    The current implementation will be logged each and every HTTP request but in production mode, I need this package only some debugging time. So if there is any option like env('LOG_HTTTP_REQUESTS', false), it will be better to check this value in middleware when you are trying to log current HTTP requests.

    Reviewed by hashemirafsan at 2022-02-04 06:51
  • 3. Clear log command will removed all logs intentionally

    From a user perspective, if I set a storage path to log my HTTP request log then I want to remove all logs related to HTTP request logs not all kinds of logs. Current scenario I logged several things on the logs folder. If I use this clear command of this package it will remove my entire application logs and a fallback log file (laravel.log) containing entire application logs so sometimes it's important.

    So I think we can remove only the HTTP request log files if the solid path is provided on config and matched, if not then no need to remove the fallback file.

    Reviewed by hashemirafsan at 2022-02-04 06:39
Laravel User Activity Log - a package for Laravel 8.x that provides easy to use features to log the activities of the users of your Laravel app
Laravel User Activity Log - a package for Laravel 8.x that provides easy to use features to log the activities of the users of your Laravel app

Laravel User Activity Log - a package for Laravel 8.x that provides easy to use features to log the activities of the users of your Laravel app

Apr 20, 2022
Laravel Authentication Log is a package Log user authentication details and send new device notifications.
Laravel Authentication Log is a package Log user authentication details and send new device notifications.

Laravel Authentication Log is a package which tracks your user's authentication information such as login/logout time, IP, Browser, Location, etc. as well as sends out notifications via mail, slack, or sms for new devices and failed logins.

Jun 23, 2022
This package provides a Logs page that allows you to view your Laravel log files in a simple UI
This package provides a Logs page that allows you to view your Laravel log files in a simple UI

A simplistics log viewer for your Filament apps. This package provides a Logs page that allows you to view your Laravel log files in a simple UI. Inst

May 19, 2022
A simple Laravel event log package for easy model based logging.

Karacraft Logman A simple Model Event Logging Package Usage Installation composer require karacraft/logman Migrate php artisan migrate Publish php a

Dec 28, 2021
PHP Simple Response, XML, JSON,... auto response with accept in request's header

simple-response Simple package to handle response properly in your API. This package does not include any dependency. Install Via Composer $ composer

Dec 8, 2021
Log activity inside your Laravel app
Log activity inside your Laravel app

Log activity inside your Laravel app The spatie/laravel-activitylog package provides easy to use functions to log the activities of the users of your

Jun 23, 2022
Easily capture every incoming request and the corresponding outgoing response in your Laravel app.
Easily capture every incoming request and the corresponding outgoing response in your Laravel app.

Easily capture every incoming request and the corresponding outgoing response in your Laravel app. This package is designed to work only with the Lara

Jun 7, 2022
Laravel-tagmanager - An easier way to add Google Tag Manager to your Laravel application.

Laravel TagManager An easier way to add Google Tag Manager to your Laravel application. Including recommended GTM events support. Requirements Laravel

Apr 19, 2022
Dashboard to view your http client requests in laravel application
Dashboard to view your http client requests in laravel application

Laravel Blanket is a package with wraps laravel http client requests and provide logs for request and response, also give option to retry any request from dashboard and more...

Jun 10, 2022
A convenient way to initialize your application
A convenient way to initialize your application

A convenient way to initialize your application. Introduction We all know, that every application should contain readme file and Installation section

Jun 21, 2022