:page_with_curl: Provides a log viewer for Laravel

Last update: May 13, 2022

LogViewer Packagist License For Laravel

Github Workflow Status Coverage Status Scrutinizer Code Quality SensioLabs Insight Github Issues

Packagist Packagist Release Packagist Downloads

By ARCANEDEV©

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

NOTE: You can also use LogViewer as an API.

Official documentation for LogViewer can be found at the _docs folder.

Feel free to check out the releases, license, and contribution guidelines.

Features

  • A great Log viewer API.
  • Laravel 5.x to 8.x are supported.
  • Ready to use (Views, Routes, controllers … Out of the box) [Note: No need to publish assets]
  • View, paginate, filter, download and delete logs.
  • Load a custom logs storage path.
  • Localized log levels.
  • Logs menu/tree generator.
  • Grouped logs by dates and levels.
  • Customized log levels icons (font awesome by default).
  • Works great with big logs !!
  • Well documented package (IDE Friendly).
  • Well tested (100% code coverage with maximum code quality).

Table of contents

  1. Installation and Setup
  2. Configuration
  3. Usage
  4. FAQ

Supported localizations

Dear artisans, i'm counting on you to help me out to add more translations ( ^_^)b

Local Language
ar Arabic
bg Bulgarian
de German
en English
es Spanish
et Estonian
fa Farsi
fr French
he Hebrew
hu Hungarian
hy Armenian
id Indonesian
it Italian
ja Japanese
ko Korean
ms Malay
nl Dutch
pl Polish
pt-BR Brazilian Portuguese
ro Romanian
ru Russian
si Sinhalese
sv Swedish
th Thai
tr Turkish
uk Ukrainian
zh Chinese (Simplified)
zh-TW Chinese (Traditional)

Contribution

Any ideas are welcome. Feel free to submit any issues or pull requests, please check the contribution guidelines.

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

Credits

PREVIEW

Dashboard Logs list Single log

GitHub

https://github.com/ARCANEDEV/LogViewer
Comments
  • 1. [Issue] There are no commands defined in the "log-viewer" namespace.

    Hi,

    I'm trying to add the package to my app, but all the commands that I run return that the class does not exists

    [InvalidArgumentException] There are no commands defined in the "log-viewer" namespace.

    The composer install runs OK, the config/app.php is also. I search over here and found nothing like that, so I think I am the first in with this.

    Here some thinks that may help.

    Env:

    System: Windows 10 build 14267 PHP: 7.0.0 Mysql: 5.6

    Laravel 5.1.30

    // config/app.php:
    'providers' => [
    
        /*
         * Development Service Providers...
         */
        Barryvdh\Debugbar\ServiceProvider::class,
    
        /*
         * Laravel Framework Service Providers...
         */
        Illuminate\Foundation\Providers\ArtisanServiceProvider::class,
        Illuminate\Auth\AuthServiceProvider::class,
        Illuminate\Broadcasting\BroadcastServiceProvider::class,
        Illuminate\Bus\BusServiceProvider::class,
        Illuminate\Cache\CacheServiceProvider::class,
        Illuminate\Foundation\Providers\ConsoleSupportServiceProvider::class,
        Illuminate\Routing\ControllerServiceProvider::class,
        Illuminate\Cookie\CookieServiceProvider::class,
        Illuminate\Database\DatabaseServiceProvider::class,
        Illuminate\Encryption\EncryptionServiceProvider::class,
        Illuminate\Filesystem\FilesystemServiceProvider::class,
        Illuminate\Foundation\Providers\FoundationServiceProvider::class,
        Illuminate\Hashing\HashServiceProvider::class,
        Illuminate\Mail\MailServiceProvider::class,
        Illuminate\Pagination\PaginationServiceProvider::class,
        Illuminate\Pipeline\PipelineServiceProvider::class,
        Illuminate\Queue\QueueServiceProvider::class,
        Illuminate\Redis\RedisServiceProvider::class,
        Illuminate\Auth\Passwords\PasswordResetServiceProvider::class,
        Illuminate\Session\SessionServiceProvider::class,
        Illuminate\Translation\TranslationServiceProvider::class,
        Illuminate\Validation\ValidationServiceProvider::class,
        Illuminate\View\ViewServiceProvider::class,
        Illuminate\Html\HtmlServiceProvider::class,
    
        /*
         * Application Service Providers...
         */
        App\Providers\AppServiceProvider::class,
        App\Providers\EventServiceProvider::class,
        App\Providers\RouteServiceProvider::class,
    
        /*
         * Custom Services Providers...
         */
        Arcanedev\LogViewer\LogViewerServiceProvider::class,
        Collective\Html\HtmlServiceProvider::class,
        Cviebrock\EloquentSluggable\SluggableServiceProvider::class,
        Vinkla\Pusher\PusherServiceProvider::class,
        Zizaco\Entrust\EntrustServiceProvider::class,
        Intervention\Image\ImageServiceProvider::class,
        MaddHatter\LaravelFullcalendar\ServiceProvider::class,
        Laravel\Socialite\SocialiteServiceProvider::class,
        Torann\GeoIP\GeoIPServiceProvider::class,
        Alexpechkarev\GoogleGeocoder\GoogleGeocoderServiceProvider::class,
        Dsdevbe\LdapConnector\LdapConnectorServiceProvider::class,
        Maatwebsite\Excel\ExcelServiceProvider::class,
    
        /*
         * Personalization Services Providers...
         */
        Aws\Laravel\AwsServiceProvider::class,
    
        /*
         * Automation Services Providers...
         */
        Orangehill\Iseed\IseedServiceProvider::class,
    
        /*
         * My Services Providers...
         */
        App\Providers\HelperServiceProvider::class,
    
    ],
    

    Anything that may help is appreciate!

    Regards, Leandro.

    Reviewed by Leandro-b-03 at 2016-02-28 16:28
  • 2. Log [] is not defined. Unable to create configured logger. Using emergency logger.

    • LogViewer Version: 4.5
    • Laravel Version: 5.6.3
    • PHP Version: 7.1.3

    Description:

    Hi,

    I did all the steps needed to install and use logviewer but when I go to http://{myproject}/log-viewer what I get is an error

    laravel.EMERGENCY: Unable to create configured logger. Using emergency logger. {"exception":"[object] (InvalidArgumentException(code: 0): Log [] is not defined. at /var/www/vendor/laravel/framework/src/Illuminate/Log/LogManager.php:181)
    [stacktrace]
    #0 /var/www/vendor/laravel/framework/src/Illuminate/Log/LogManager.php(115): Illuminate\\Log\\LogManager->resolve(NULL)
    #1 /var/www/vendor/laravel/framework/src/Illuminate/Log/LogManager.php(103): Illuminate\\Log\\LogManager->get(NULL)
    #2 /var/www/vendor/laravel/framework/src/Illuminate/Log/LogManager.php(572): Illuminate\\Log\\LogManager->driver()
    #3 /var/www/vendor/barryvdh/laravel-debugbar/src/LaravelDebugbar.php(270): Illuminate\\Log\\LogManager->__call('listen', Array)
    #4 /var/www/vendor/barryvdh/laravel-debugbar/src/Middleware/InjectDebugbar.php(61): Barryvdh\\Debugbar\\LaravelDebugbar->boot()
    #5 /var/www/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): Barryvdh\\Debugbar\\Middleware\\InjectDebugbar->handle(Object(Illuminate\\Http\\Request), Object(Closure))
    #6 /var/www/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
    #7 /var/www/vendor/fideloper/proxy/src/TrustProxies.php(57): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
    #8 /var/www/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): Fideloper\\Proxy\\TrustProxies->handle(Object(Illuminate\\Http\\Request), Object(Closure))
    #9 /var/www/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
    #10 /var/www/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(30): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
    #11 /var/www/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest->handle(Object(Illuminate\\Http\\Request), Object(Closure))
    #12 /var/www/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
    #13 /var/www/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(30): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
    #14 /var/www/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest->handle(Object(Illuminate\\Http\\Request), Object(Closure))
    #15 /var/www/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
    #16 /var/www/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ValidatePostSize.php(27): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
    #17 /var/www/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): Illuminate\\Foundation\\Http\\Middleware\\ValidatePostSize->handle(Object(Illuminate\\Http\\Request), Object(Closure))
    #18 /var/www/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
    #19 /var/www/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/CheckForMaintenanceMode.php(46): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
    #20 /var/www/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(149): Illuminate\\Foundation\\Http\\Middleware\\CheckForMaintenanceMode->handle(Object(Illuminate\\Http\\Request), Object(Closure))
    #21 /var/www/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php(53): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
    #22 /var/www/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(102): Illuminate\\Routing\\Pipeline->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
    #23 /var/www/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(151): Illuminate\\Pipeline\\Pipeline->then(Object(Closure))
    #24 /var/www/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(116): Illuminate\\Foundation\\Http\\Kernel->sendRequestThroughRouter(Object(Illuminate\\Http\\Request))
    #25 /var/www/public/index.php(55): Illuminate\\Foundation\\Http\\Kernel->handle(Object(Illuminate\\Http\\Request))
    #26 {main}
    "}
    

    My question is, is it not supported for Laravel Version: 5.6.3 ? I added APP_LOG=daily LOG_CHANNEL=daily in my .env file and Arcanedev\LogViewer\LogViewerServiceProvider::class on my app.php service provider section.

    Thank you for your time.

    Reviewed by akampour21 at 2018-02-21 14:53
  • 3. Avoid loading whole log files into memory

    This package looks well thought-through and organised - looking forward to trying it out.

    Now, every single other log viewer package I've seen starts by loading an entire log file into memory, then parsing it from there. When the log files get big, then it blows the memory limits and fails. This can be a big problem at those times when you really need to be able to view the logs.

    So, does this package load whole log files into memory (in parsed or raw form)? Or can it extract a portion of a log file direct from disk based on the page options (e.g. retrieve just log entries N to N+m from a file)?

    It strikes me also that the start of each log entry could be indexed by byte position, so a position in a file can be seeked very quickly. Even if only every 10th or 100th log entry were indexed, it would provide some starting points.

    Anyway - this is mainly a question (and I have not found the bit where you actually open the file for reading yet, so I don't know the answer).

    Reviewed by judgej at 2015-10-27 12:00
  • 4. Add timezone for parsing the log date

    Hello thanks for your great job i think it is good to have the option to set different timezone for viewing the logs for example i have an application for different timezone and i want to see the logs in my timezone

    Reviewed by mbpcoder at 2017-01-14 09:06
  • 5. Potential XXS vulnerability in search feature

    • LogViewer Version: 4.5.3
    • Laravel Version: 5.6.28
    • PHP Version: 7.3.10

    Description:

    I recently had a PenTest carried out and it came back in the report that the log viewer search functionality is vulnerable to XSS attack

    Steps To Reproduce:

    1. Go to LogViewer
    2. Perform a search within a specific log entry like so:

    GET /thanos/log-viewer/logs/2019-10-03/error/search?query=%22%3E%3Cimg+src%3Dasdf+onerror%3Dalert%28document.cookie%29%3E

    1. The JavaScript alert will trigger
    Reviewed by blorange2 at 2019-10-14 15:25
  • 6. Allowed memory exhausted error

    hi

    when i access http://{my-project}/log-viewer, there is a error come out "Allowed memory size of 67108864 bytes exhausted (tried to allocate 8388616 bytes) " and it happened in "log-viewer/src/Helpers/LogParser.php:71 preg_match_all()".

    i can edit my php.ini to increase memory for a while, but in future if log files go to bigger then i have to edit php.ini to increase memory again

    can i not read all log files , for example , only read last 10 log files or last 7days log files?

    Regards

    Reviewed by wangjialei01 at 2016-11-04 00:35
  • 7. 5.2.0 still fails with PHP 7.4

    • LogViewer Version: 5.2.0
    • Laravel Version: 6.12.0
    • PHP Version: 7.4.2

    Description:

    Showing a log under /log-viewer/logs/2020-01-27 (example date) still gives this error:

    join(): Passing glue string after array is deprecated. Swap the parameters (View: /var/www/resources/views/vendor/log-viewer/bootstrap-4/show.blade.php)
    

    This shouldn't happen as compatibility with PHP 7.4 was introduced in Log Viewer 5.1.7.

    Steps To Reproduce:

    Thanks :)

    Reviewed by panique at 2020-01-27 19:13
  • 8. Make stack trace more readable

    This PR comes from the desire to make this awesome tool even better! :)

    In current version if stack is too long, table starts to resize and you have to scroll the whole table to read or close opened stack. Now only stack row is scrollable.

    Also switched to monospace font in trace, made it lighter, and added ability to highlight words in it. This behaviour is fully configurable and highlights line numbers by default.

    Reviewed by mlanin at 2017-05-18 13:15
  • 9. Pagination url is not forming correctly (Broken)

    • LogViewer Version: 4.3
    • Laravel Version: 5.4
    • PHP Version: 7

    Description:

    Pagination not working properly

    http://localhost.test/log-viewer/logs

    when i click on second page it is redirecting to the

    http://localhost.test/?page=2

    Not retaining actual url

    Steps To Reproduce:

    1. Go to log-viewer dashboard
    2. Click on Logs (make sure you have many logs so you can see pages)
    3. Click on any page at the top or bottom or click on next/previous
    4. You will notice it has broken the pagination it will redirect to home page.
    Reviewed by rajjanorkar at 2018-03-03 06:47
  • 10. Pattern for matching any log in log folder starting with laravel-

    I'm probably doing this wrong, so thought I'd ask first, but I can't get the pattern to work for all log files:

    'pattern'       => [
        'prefix'    => Filesystem::PATTERN_PREFIX,    // 'laravel-'
        'date'      => '.*',
        'extension' => Filesystem::PATTERN_EXTENSION, // '.log'
    ],
    

    All of my log files are laravel-cli-2016-04-10.log and laravel-fpm-fcgi-2017-04-10.log

    Any ideas? Is the regex wrong?

    Reviewed by jonathan-bird at 2017-04-10 07:54
  • 11. 404 error

    I just tried this package in 2 laravel (5.1) installations (to be sure). I keep getting a 404 error when I go to /log-viewer on my project.

    Steps I have done:

    • Setup composer.json correcty
    • Composer update
    • Add provider to config/app.php
    • Publish it through command
    • Acces domain.com/log-viewer

    Result 404 page

    Am I missing something? Or is my routes blocking this feature?

    Reviewed by Cannonb4ll at 2015-09-09 14:17
  • 12. Allow suffix in pattern.

    These small modifications allow the display of multiple env logs with the same date.

    For example:

    'suffix' => '-{webapp,root}'

    it will show: laravel-2022-04-18-webapp.log, laravel-2022-04-18-root.log

    Another example:

    'suffix' => '-{cli,pm-fcgi}'

    it will show: laravel-2022-04-18-cli.log, laravel-2022-04-18-fpm-fcgi.log

    Related: #135, #65

    Captura de pantalla de 2022-04-18 22-09-14

    Reviewed by padre at 2022-04-18 20:13
  • 13. Delete multiple logs at once from UI

    I see you've added an artisan command to clear all logs and that's helpful, but I would find it very useful to be able to execute that from your awesome UI. So many times I have to manually click 10+ delete icons from the UI because SSH'ing to the server in order to run the artisan command is more time-consuming / not convenient.

    It would be nice if there was a "delete all" button on the UI. And it would also be nice if there was a checkbox column that allowed us to select all / individual logs to clear.

    Furthermore, it would be nice if your artisan command accepted parameters to delete, for example, all but the last 10 logs. This way we could add this to the scheduler as a very basic form of logrotate

    Reviewed by vesper8 at 2021-02-17 13:35
The VarDumper component provides mechanisms for walking through any arbitrary PHP variable. It provides a better dump() function that you can use instead of var_dump().

VarDumper Component The VarDumper component provides mechanisms for walking through any arbitrary PHP variable. It provides a better dump() function t

May 18, 2022
Laravel Dumper - Improve the default output of dump() and dd() in Laravel projects

Laravel Dumper Improve the default output of dump() and dd() in Laravel projects. Improves the default dump behavior for many core Laravel objects, in

May 12, 2022
Generate Laravel test factories from your existing models

Laravel Test Factory Generator php artisan generate:model-factory This package will generate factories from your existing models so you can get starte

May 15, 2022
Laravel Debugbar (Integrates PHP Debug Bar)
Laravel Debugbar (Integrates PHP Debug Bar)

Laravel Debugbar This is a package to integrate PHP Debug Bar with Laravel. It includes a ServiceProvider to register the debugbar and attach it to th

May 24, 2022
A beautiful error page for Laravel apps
A beautiful error page for Laravel apps

Ignition: a beautiful error page for Laravel apps Ignition is a beautiful and customizable error page for Laravel applications running on Laravel 5.5

May 13, 2022
A Laravel Package to integrate Nette Tracy Debugger
A Laravel Package to integrate Nette Tracy Debugger

Nette Tracy for Laravel 5 Better Laravel Exception Handler Features Visualization of errors and exceptions Debugger Bar (ajax support @v1.5.6) Excepti

May 3, 2022
An elegant debug assistant for the Laravel framework.
An elegant debug assistant for the Laravel framework.

Introduction Laravel Telescope is an elegant debug assistant for the Laravel framework. Telescope provides insight into the requests coming into your

May 19, 2022
This package connects a Laravel Octance application with Tideways for PHP Monitoring, Profiling and Exception Tracking.

Tideways Middleware for Laravel Octane This package connects a Laravel Octance application with Tideways for PHP Monitoring, Profiling and Exception T

Jan 6, 2022
Ray server is a beautiful, lightweight php app build on Laravel that helps you debug your app. It runs without installation on multiple platforms.
Ray server is a beautiful, lightweight php app build on Laravel that helps you debug your app. It runs without installation on multiple platforms.

RayServer is a beautiful, lightweight web server built on Laravel and VueJs that helps debugging your app. It runs without installation on multiple platforms.

May 16, 2022
Buggregator is a beautiful, lightweight web server built on Laravel and VueJs that helps debugging your app.
Buggregator is a beautiful, lightweight web server built on Laravel and VueJs that helps debugging your app.

A server for debugging more than just Laravel applications. Buggregator is a beautiful, lightweight web server built on Laravel and VueJs that helps d

May 16, 2022
:dromedary_camel: Laravel log viewer
:dromedary_camel: Laravel log viewer

Laravel log viewer TL;DR Log Viewer for Laravel 5, 6, 7 & 8 (still compatible with 4.2 too) and Lumen. Install with composer, create a route to LogVie

May 24, 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

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

Apr 20, 2022
A Laravel package to output a specific sql to your favourite debugging tool. The supported log output is Laravel Telescope, Laravel Log, Ray, Clockwork, Laravel Debugbar and your browser.
A Laravel package to output a specific sql to your favourite debugging tool. The supported log output is Laravel Telescope, Laravel Log, Ray, Clockwork, Laravel Debugbar and your browser.

Laravel showsql A Laravel package to output a specific sql to your favourite debugging tool, your browser or your log file. Use case You often want to

Apr 15, 2022
Robot increase telegram post 👁‍🗨Telegram Fake Posts Viewer👁‍🗨
Robot increase telegram post 👁‍🗨Telegram Fake Posts Viewer👁‍🗨

Program Features - ?? Very and stylish design. - ?? It has glass buttons. - ?? Has a professional management panel. - ?? Has a user area. - ?? Free di

Nov 15, 2021
Laravel Authentication Log is a package Log user authentication details and send new device notifications.
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.

May 14, 2022
Sends log messages to the Logentries log management service

Phalcon Logentries Phalcon library to connect and make log entries using Logentries. You can adapt it to your own needs or improve it if you want. Ple

Apr 15, 2019
This package provides a Logs page that allows you to view your Laravel log files in a simple UI
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

May 19, 2022
Laravel Logable is a simple way to log http request in your Laravel application.
 Laravel Logable is a simple way to log http request in your Laravel application.

Laravel Logable is a simple way to log http request in your Laravel application. Requirements php >= 7.4 Laravel version >= 6.0 Installation composer

Feb 5, 2022
Log activity inside your Laravel app
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

May 24, 2022
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

May 18, 2022