A Laravel log reader

rap2hpoutre/laravel-log-viewer image

rap2hpoutre/laravel-log-viewer stats

Downloads
8.8M
Stars
3,047
Open Issues
43
Forks
374

View on GitHub →

Rap2hpoutre Laravel-log-viewer Readme


Laravel log viewer

TL;DR

Log Viewer for Laravel 5, 6, 7, 8 & 9 (still compatible with 4.2 too) and Lumen. Install with composer, create a route to LogViewerController. No public assets, no vendor routes, works with and/or without log rotate. Inspired by Micheal Mand's Laravel 4 log viewer (works only with laravel 4.1)

What ?

Small log viewer for laravel. Looks like this:

Install (Laravel)

Install via composer

composer require rap2hpoutre/laravel-log-viewer

Add Service Provider to config/app.php in providers section

Rap2hpoutre\LaravelLogViewer\LaravelLogViewerServiceProvider::class,

Add a route in your web routes file:

Route::get('logs', [\Rap2hpoutre\LaravelLogViewer\LogViewerController::class, 'index']);

Go to http://myapp/logs or some other route

Install (Lumen)

Install via composer

composer require rap2hpoutre/laravel-log-viewer

Add the following in bootstrap/app.php:

$app->register(\Rap2hpoutre\LaravelLogViewer\LaravelLogViewerServiceProvider::class);

Explicitly set the namespace in app/Http/routes.php:

$router->group(['namespace' => '\Rap2hpoutre\LaravelLogViewer'], function() use ($router) {
$router->get('logs', 'LogViewerController@index');
});

Advanced usage

Customize view

Publish log.blade.php into /resources/views/vendor/laravel-log-viewer/ for view customization:

php artisan vendor:publish \
--provider="Rap2hpoutre\LaravelLogViewer\LaravelLogViewerServiceProvider" \
--tag=views

Edit configuration

Publish logviewer.php configuration file into /config/ for configuration customization:

php artisan vendor:publish \
--provider="Rap2hpoutre\LaravelLogViewer\LaravelLogViewerServiceProvider"

Troubleshooting

If you got a InvalidArgumentException in FileViewFinder.php error, it may be a problem with config caching. Double check installation, then run php artisan config:clear.

rap2hpoutre photo

Tinkering @ beta.gouv.fr & fabrique.social.gouv.fr. Stodgy mixture of Rust, JS, PHP, Forth, SQL, GFA Basic, music and more.

Cube

Laravel Newsletter

Join 40k+ other developers and never miss out on new tips, tutorials, and more.


Rap2Hpoutre Laravel Log Viewer Related Articles

Laravel Log Viewer image

Laravel Log Viewer

Read article
Lucky Media logo

Lucky Media

Get Lucky Now - the ideal choice for Laravel Development, with over a decade of experience!

Lucky Media
Bacancy logo

Bacancy

Supercharge your project with a seasoned Laravel developer with 4-6 years of experience for just $2500/month. Get 160 hours of dedicated expertise & a risk-free 15-day trial. Schedule a call now!

Bacancy
SaaSykit: Laravel SaaS Starter Kit logo

SaaSykit: Laravel SaaS Starter Kit

SaaSykit is a Multi-tenant Laravel SaaS Starter Kit that comes with all features required to run a modern SaaS. Payments, Beautiful Checkout, Admin Panel, User dashboard, Auth, Ready Components, Stats, Blog, Docs and more.

SaaSykit: Laravel SaaS Starter Kit
MongoDB logo

MongoDB

Enhance your PHP applications with the powerful integration of MongoDB and Laravel, empowering developers to build applications with ease and efficiency. Support transactional, search, analytics and mobile use cases while using the familiar Eloquent APIs. Discover how MongoDB's flexible, modern database can transform your Laravel applications.

MongoDB
Tinkerwell logo

Tinkerwell

The must-have code runner for Laravel developers. Tinker with AI, autocompletion and instant feedback on local and production environments.

Tinkerwell
Laravel Forge logo

Laravel Forge

Easily create and manage your servers and deploy your Laravel applications in seconds.

Laravel Forge