PHPackages                             mikailfaruqali/log-viewer - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Logging &amp; Monitoring](/categories/logging)
4. /
5. mikailfaruqali/log-viewer

ActiveLibrary[Logging &amp; Monitoring](/categories/logging)

mikailfaruqali/log-viewer
=========================

A modern, elegant, and feature-rich log viewer for Laravel applications. Experience a beautiful glassmorphism-inspired interface that makes viewing and managing your application logs both intuitive and visually appealing.

2.5.3(2mo ago)1305↓100%MITBladePHP ^7.4|^8.0|^8.1|^8.2|^8.3

Since Jul 24Pushed 2mo agoCompare

[ Source](https://github.com/mikailfaruqali/log-viwer)[ Packagist](https://packagist.org/packages/mikailfaruqali/log-viewer)[ Docs](https://github.com/mikailfaruqali/log-viewer)[ RSS](/packages/mikailfaruqali-log-viewer/feed)WikiDiscussions main Synced today

READMEChangelog (10)Dependencies (4)Versions (15)Used By (0)

📋 Snawbar Log Viewer
====================

[](#-snawbar-log-viewer)

[![License: MIT](https://camo.githubusercontent.com/fdf2982b9f5d7489dcf44570e714e3a15fce6253e0cc6b5aa61a075aac2ff71b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d79656c6c6f772e737667)](https://opensource.org/licenses/MIT)[![PHP Version](https://camo.githubusercontent.com/6eff5053a32c9e0bcc0982c4f118ef689cad7831a3d982767aae3901bf67313c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d253345253344372e342d626c75652e737667)](https://php.net)[![Laravel](https://camo.githubusercontent.com/c4899bbb94e3d3882e1dadad1d044575f6252ea12970ece84c3df7d81e8b9713/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c61726176656c2d253345253344352e302d7265642e737667)](https://laravel.com)

A modern, elegant, and feature-rich log viewer for Laravel applications. Experience a beautiful glassmorphism-inspired interface that makes viewing and managing your application logs both intuitive and visually appealing.

✨ Features
----------

[](#-features)

### 🎨 **Modern UI/UX**

[](#-modern-uiux)

- **Glassmorphism Design**: Beautiful translucent interface with backdrop blur effects
- **Dark Theme**: Eye-friendly dark interface perfect for development environments
- **Responsive Layout**: Fully responsive design that works on desktop, tablet, and mobile
- **Smooth Animations**: CSS transitions and hover effects for enhanced user experience
- **Mobile-First**: Collapsible sidebar and touch-friendly interactions on mobile devices

### 📁 **File Management**

[](#-file-management)

- **Smart File Detection**: Automatically discovers all `.log` files in your `storage/logs` directory
- **File Switching**: Seamlessly switch between different log files with a single click
- **File Deletion**: Safely delete old log files directly from the interface with confirmation
- **File Sorting**: Log files are automatically sorted by modification time (newest first)
- **File Status**: Visual indicators for active/selected files

### 📊 **Log Parsing &amp; Display**

[](#-log-parsing--display)

- **Intelligent Parsing**: Advanced regex-based log parsing that handles Laravel's log format
- **Multi-line Support**: Properly handles stack traces and multi-line log entries
- **Log Levels**: Color-coded log levels (debug, info, notice, warning, error, critical, alert, emergency)
- **Timestamp Formatting**: Human-readable timestamp display
- **Environment Detection**: Automatically detects and displays the environment (production, local, etc.)

### 🔍 **Enhanced Viewing Experience**

[](#-enhanced-viewing-experience)

- **Expandable Entries**: Click to expand log entries and view full messages and stack traces
- **Stack Trace Viewer**: Properly formatted stack trace display for debugging
- **Message Truncation**: Long messages are truncated with ellipsis and expandable on demand
- **Empty State Handling**: Graceful handling of empty log files and missing selections
- **Error Recovery**: Robust error handling for corrupted or unreadable log files

### 🔐 **Security &amp; Access Control**

[](#-security--access-control)

- **Authentication Required**: Protected by Laravel's authentication middleware by default
- **Configurable Middleware**: Easily add custom authorization middleware
- **CSRF Protection**: All delete operations are CSRF protected
- **Input Validation**: Comprehensive validation for all user inputs
- **Safe File Operations**: Prevents directory traversal and unauthorized file access

### ⚡ **Performance &amp; Reliability**

[](#-performance--reliability)

- **Efficient Parsing**: Optimized log parsing algorithm that handles large files
- **Memory Management**: Processes logs efficiently without excessive memory usage
- **Error Logging**: Internal errors are logged for debugging purposes
- **Graceful Degradation**: Continues working even when individual log files have issues

### 🛠️ **Developer Experience**

[](#️-developer-experience)

- **Zero Dependencies**: No external CSS or JS frameworks required
- **Easy Installation**: Simple Composer installation with auto-discovery
- **Configurable Routes**: Customize the route path and middleware
- **Publishable Views**: Customize the interface to match your application's design
- **Clean Architecture**: Well-structured codebase following Laravel conventions

🚀 Installation
--------------

[](#-installation)

Install the package via Composer:

```
composer require mikailfaruqali/log-viewer
```

The package uses Laravel's auto-discovery feature, so no additional setup is required.

⚙️ Configuration
----------------

[](#️-configuration)

### Basic Configuration

[](#basic-configuration)

The package works out-of-the-box, but you can publish the configuration file for customization:

```
php artisan vendor:publish --provider="Snawbar\LogViewer\LogViewerServiceProvider" --tag="config"
```

This creates a `config/snawbar-log-viewer.php` file:

```
