How to setup LogViewer in your Laravel application

This package allows you to manage and keep track of each one of your log files.

Iftikhar Ahmed
2 min readMar 6, 2019

--

https://raw.githubusercontent.com/ARCANEDEV/LogViewer/master/_screenshots/1-dashboard.jpg

Managing and reading logs in Laravel was always a difficult task. But here I’m sharing something which makes logs readable in your browser in a very easy and efficient way.

There is a package called ARCANEDEV/LogViewer for Laravel.

Before Install:

Before starting installation you need to understand a few things that LogViewer support only the daily log channel, so make sure that the LOG_CHANNEL is set to daily instead of stack in your .env file. For Laravel 5.5 and below, set this in your .env file.

APP_LOG=daily

Version Compatibility:

Now, It’s time to Setup. Let’s dig into it:

You can install this package via Composer by running this command: composer require arcanedev/log-viewer:{x.x} where x.x is the version compatible with your Laravel application.

Add ARCANEDEV/LogViewer package to your project using Composer.

composer require arcanedev/log-viewer:{x.x}

Here x.x is the version compatible with your laravel application.

After successful installation of the package, you need to register the Service Provider in config/app.php in the providers array:

'providers' => [

Arcanedev\LogViewer\LogViewerServiceProvider::class,
],

Publish config and other required resources

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

That’s all.

Visit http://your_project_name/log-viewer

Thank you for reading the article.

If you like the article don’t forget to clap.

If you want to read my other articles:

Have questions? Please feel free to contact me Twitter, GitHub or join me on Slack #powwow

--

--

Iftikhar Ahmed
Iftikhar Ahmed

Written by Iftikhar Ahmed

My name is Iftikhar Ahmed and I am a Full-Stack Developer, currently living in Karachi, Pakistan.

No responses yet

Write a response