Laravel 7/6 - Log viewer using LogViewer package
Teams applying “Laravel 7/6 - Log viewer using LogViewer package” in a production project can use the relevant Monitask guide to record implementation, review and debugging time, then compare that effort with tests and shipped functionality instead of treating activity as performance by itself.
Before copying the example into a live application, confirm version-specific behaviour with the official Laravel website and test it against the project’s actual database and runtime.
Hi Guys,
In this Tutorials,I will learn you how to install log viewer package in laravel 7/6.
you can simply and easy to logviewer package in laravel 7/6.
Laravel provides log file that store all runtime error exception or any other error that get, we can view log file better using LogViewer composer package. laravel store very logs on a log file. So if it occurs any error, warning, alert etc that store in laravel log file. but it is store in error format, we can make it readable format and know how much error with a description, so we can resolve it and make it a better web application.
we have to just install LogViewer package and all configuration so we can customize LogViewer package. So let's start to install and configuration of LogViewer package.
Installation Of LogViewer Package:
we will install LogViewer composer package using by following command in our laravel 6 application. So let's run bellow command.
composer require arcanedev/log-viewer
Ok, after install package successfully, we will check to app.php configuration file.
config/app.php
<?php
return [
....
'providers' => [
....
Arcanedev\LogViewer\LogViewerServiceProvider::class,
]
.....
]
Configuration Of LogViewer Package: we will generate configuration of LogViewer composer package like generate layout file, css file, config file etc. bellow command Publish the Config and Translations Files
php artisan log-viewer:publish
To force publishing
php artisan log-viewer:publish --force
Publishing the config only
php artisan log-viewer:publish --tag=config
Publishing the translations only
php artisan log-viewer:publish --tag=lang
Application requirements & log files check
php artisan log-viewer:check
Configuration Of Laravel Log: now by default we have "stack" value in LOG_CHANNEL variable on env file for log. we have to change value stack into daily, so our package will display every day log. So let's change:
.env
LOG_CHANNEL=daily
Now we are ready to to run this package. so let's run our example so run bellow command for quick run
php artisan serve
Open following URL:
http://localhost:8000/log-viewer
You will get layout like as bellow:
- How to Notifications With database Driver in Laravel 11?
- How to Send Email Via Notification in Laravel 11?
- How to Install and Configure Laravel 11 Debugbar?
- How to Like Dislike System in Laravel 11?
- How to Paginate a Model with Relationship in Laravel 11?
- Laravel 11 Upload Files to Amazon S3 Example
- Laravel 11 Send WhatsApp Messages Example
- Laravel 11 Rest API Authentication Using JWT Tutorial