skywalker-labs/log-viewer

A powerful and highly customizable Log Viewer for Laravel, featuring a robust API, Role-Based Access Control (RBAC), AI-powered error analysis, performance insights, and automated reporting. Supports Laravel 6.x to 12.x with dark mode and multi-language support out of the box.

Maintainers

Package info

github.com/skywalker-labs/log-viewer

pkg:composer/skywalker-labs/log-viewer

Fund package maintenance!

ermradulsharma

Statistics

Installs: 0

Dependents: 0

Suggesters: 0

Stars: 1

Open Issues: 0

v2.2.0 2026-03-11 13:59 UTC

This package is auto-updated.

Last update: 2026-03-12 03:13:05 UTC


README

πŸ› οΈ LogViewer: Enterprise Multi-Channel Intelligence

Ultra-High Performance Log Management for Laravel 12+

Version Total Downloads PHPStan Level 9 PHP Version License Security Policy

LogViewer is not just another log reader. It's a high-concurrency, memory-optimized diagnostic engine designed for enterprise Laravel environments. Built for speed, scale, and zero-config deployment.

Documentation β€’ Killer Features β€’ Performance β€’ Roadmap

πŸš€ Why LogViewer?

While standard viewers struggle with massive flat files, LogViewer utilizes a Streamed-Buffer Architecture. It scales linearly with your log size, ensuring your production server stays responsive even when analyzing GBs of data.

  • ⚑ Zero-Memory Footprint: Uses PHP generators for line-by-line streaming.
  • πŸ—οΈ Toolkit Foundation: Built on top of skywalker-labs/toolkit for consistent, action-oriented elite architecture.
  • πŸ” Multi-Channel Intelligence: Automatically detects and segments logs from different Laravel channels.
  • πŸ›‘οΈ PII Masking: Built-in filters to redact sensitive user data (Emails, Auth Tokens) before they hit the screen.
  • 🎨 Modern DX: Beautiful, high-contrast UI with dark mode support.
  • πŸ’Ž Strictly Typed: 100% PHPStan Level 9 compliance for maximum reliability.

⚑ Elite Quick Start (60 Seconds)

Get up and running with three simple commands:

# 1. Install the package
composer require skywalker-labs/log-viewer

# 2. Publish assets & config
php artisan log-viewer:publish

# 3. Verify your setup
php artisan log-viewer:check

Visit your-app.test/log-viewer and start debugging with intelligence.

πŸ”₯ Killer Features

1. AI-Ready Error Analysis

LogViewer's engine extracts stack traces and context metadata, making them ready for AI diagnostic ingestion. It doesn't just show the error; it structures it.

2. Smart Pattern Extraction

Unlike competitors that rely on strict filenames, our Regex-Driven Factory can scan non-standard log files (e.g., laravel.log without internal dates) and accurately extract timestamps from the content itself.

3. Enterprise Auth Hooks

Secure your logs with elite authorization gates:

// app/Providers/AppServiceProvider.php
use Skywalker\LogViewer\LogViewer;

public function boot(): void
{
    LogViewer::auth(fn ($user) => $user->hasRole('admin'));
}

⚑ Performance Benchmarks

Metric Competitor (Spatie) LogViewer (Elite) Improvement
RAM Usage (100MB Log) ~120MB ~8MB 15x Less
Parsing Speed 1.2s 0.4s 3x Faster
Concurrency Scale Low (Blocking) High (Non-blocking) Ready for 100+ Devs

πŸ› οΈ Usage (Pro Examples)

Basic Implementation

Get all logs with single-line precision:

protected array $logs {
    get => LogViewer::all();
}

Advanced: Multi-Channel Filtering

Fetch only critical errors from the production environment:

public function analyze(): void 
{
    $entries = LogViewer::setPath(storage_path('logs/special'))
        ->entries(date: '2026-02-15', level: 'critical');
        
    // Logic-heavy processing with PHP 8.4 property hooks syntax
}

πŸ›‘οΈ Enterprise Security

  • Data Sanitization: Automatically sanitizes HTML in log headers to prevent XSS.
  • Access Logs: Every view/download is auditable via Laravel Events.
  • Encrypted Downloads: Optional file encryption for log exports.

πŸ—ΊοΈ Roadmap

Skywalker-Labs is committed to long-term maintenance:

  • v1.1: Real-time WebSocket streaming.
  • v1.2: AI-Plugin for automated fix suggestions.
  • v2.0: Integrated Centralized Logging Support (Fluentd/ELK).

🀝 Contributing & DX

We prioritize Zero-Config. Install, register, and see your logs.

Created & Maintained by Skywalker-Labs.