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

Overview

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.

You might also like...
Laravel telegram log is a package that can catch your logs all quite simply

Laravel Telegram log Laravel telegram log is a package that can catch your logs all quite simply. Requirments This package is tested with Laravel v8 i

OPcodes's Log Viewer is a perfect companion for your Laravel app
OPcodes's Log Viewer is a perfect companion for your Laravel app

Log Viewer Easy-to-use, fast, and beautiful Features | Installation | Configuration | Authorization | Troubleshooting | Credits OPcodes's Log Viewer i

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

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

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

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

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

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

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

Comments
  • Specific path logging config

    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

    opened by hashemirafsan 0
  • Configurable option need to collect the logs

    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.

    opened by hashemirafsan 0
  • Clear log command will removed all logs intentionally

    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.

    opened by hashemirafsan 0
Releases(v1.0.1)
Owner
Sagar
PHP | Laravel | Slim | WordPress | Python | Django | JavaScript | Typescript | Angular | VueJs | NodeJs | Shellsciprt | Docker
Sagar
Validate your input data in a simple way, an easy way and right way. no framework required. For simple or large. project.

wepesi_validation this module will help to do your own input validation from http request POST or GET. INTEGRATION The integration is the simple thing

Boss 4 Dec 17, 2022
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

null 9 Dec 14, 2022
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.

Anthony Rappa 540 Jan 5, 2023
Easy way to upload Laravel model related files from the request.

Easy way to upload laravel model related file from the requset.

Emon Khan 5 Dec 15, 2022
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

Ryan Chandler 9 Sep 17, 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

Karacraft 0 Dec 28, 2021
Laravel Simple Access Log

Laravel Simple Access Log Many systems need to log user access for auditing purposes. This package creates a database table with sensible fields for l

Irfaan Nujjoo 0 Jan 13, 2022
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

Phuong Danh 3 Dec 8, 2021
Simple solution for form request validation on lumen.

Form Request Validation for Lumen This small package contains a laravel-like solution for request form validation. Contents Form Request Validation fo

Samuel Nunes de Souza 5 Nov 4, 2022
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

Spatie 4.6k Jan 7, 2023