novay / log-module
Laravel Logger Package
Installs: 1
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Language:HTML
Type:laravel-module
Requires
- php: >=7.0.0
- jaybizzle/laravel-crawler-detect: 1.*
- laravelcollective/html: ^5.4|^5.5|^5.6|^5.7|^5.8|^6.0
This package is auto-updated.
Last update: 2025-03-20 08:27:00 UTC
README
Table of contents:
About
This module is an activity event logger for your Laravel application. It comes out the box with ready to use with dashboard to view your activity. Laravel logger can be added as a middleware or called through a trait. Easily have an Activity Log. This package is easily configurable and customizable. Supports Laravel 5.3, 5.4, 5.5, 5.6, 5.7, 5.8 and 6+.
Requirements
Installation Instructions
- Install Package Via Composer
composer require novay/log-module
- Migrate
php artisan module:migrate Log
- Configuration (Next Step)
This file config can be found on
Module\Config\config.php
. You can enable/disable this module directly from there.
Usage
Middleware Usage
Events for laravel authentication scaffolding are listened for as providers and are enabled via middleware. You can add events to your routes and controllers via the middleware:
activity
Example to start recording page views using middlware in web.php
:
Route::group(['middleware' => ['web', 'activity']], function () { Route::get('/', 'WelcomeController@welcome')->name('welcome'); });
This middlware can be enabled/disabled in the configuration settings.
Trait Usage
Events can be recorded directly by using the trait. When using the trait you can customize the event description.
To use the trait:
- Include the call in the head of your class file:
<?php namespace ... use ActivityLogger; class ...
- Include the trait call in the opening of your class:
... class ExampleController extends Controller { use ActivityLogger; ... }
- You can record the activity by calling the traits method:
ActivityLogger::activity("Logging this activity.");
Features
Log Activity Features |
---|
Logs login page visits |
Logs user logins |
Logs user logouts |
Routing Events can recording using middleware |
Records activity timestamps |
Records activity description |
Records activity user type with crawler detection. |
Records activity Method |
Records activity Route |
Records activity Ip Address |
Records activity User Agent |
Records activity Browser Language |
Records activity referrer |
Activity panel dashboard |
Individual activity drilldown report dashboard |
Activity Drilldown looks up Id Address meta information |
Activity Drilldown shows user roles if enabled |
Activity Drilldown shows associated user events |
Activity log can be cleared, restored, and destroyed using eloquent softdeletes |
Cleared activity logs can be viewed and have drilldown ability |
Uses font awesome & cdn assets online |
Uses Geoplugin API for drilldown IP meta information |
Uses Language localization files |
Screenshots
License
Log Activity Module is licensed under the MIT license and originaly owned by Jeremy Kenedy for both personal and commercial products. Enjoy!