munch/filament-logviewer 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

munch/filament-logviewer

Composer 安装命令:

composer require munch/filament-logviewer

包简介

A beautiful Filament plugin to view, filter, and manage Laravel log files

README 文档

README

A simple and powerful Filament plugin to view, filter, and manage Laravel log files directly from your admin panel.

Features

  • 📋 View all log files from storage/logs
  • 🔍 Parse and display log entries with full context
  • 🎯 Filter by log level (emergency, alert, critical, error, warning, notice, info, debug)
  • 📅 Filter by date/time range
  • 🔎 Search across log messages and context
  • 🗑️ Delete individual or multiple log files
  • 🧹 Empty log files without deleting them
  • 🎨 Color-coded log levels for easy identification
  • ⚡ Optimized for large log files

Requirements

  • PHP 8.4+
  • Laravel 12.0+
  • Filament 4.0+

Installation

Option A: From Packagist (Recommended)

Install via composer:

composer require munch/filament-logviewer

Option B: Local Development

For local development, add this to your Laravel project's composer.json:

{
  "repositories": [
    {
      "type": "path",
      "url": "../filament-logviewer"
    }
  ]
}

Then require the package:

composer require munch/filament-logviewer:@dev

Usage

Register the plugin in your Filament Panel Provider (e.g., app/Providers/Filament/AdminPanelProvider.php):

use Munch\FilamentLogviewer\FilamentLogviewerPlugin;

class AdminPanelProvider extends PanelProvider
{
    public function panel(Panel $panel): Panel
    {
        return $panel
            // ... other configuration
            ->plugins([
                FilamentLogviewerPlugin::make(),
            ]);
    }
}

The plugin will automatically register itself and appear in your Filament admin panel navigation under the "Settings" group.

Configuration

Publish the config file (optional):

php artisan vendor:publish --tag="filament-logviewer-config"

Customize the behavior in config/filament-logviewer.php:

return [
    // Path to log files
    'path' => storage_path('logs'),
    
    // Maximum file size to read (10MB default)
    'max_file_size' => 10 * 1024 * 1024,
    
    // Entries per page
    'per_page' => 50,
    
    // Navigation settings
    'navigation' => [
        'group' => 'Settings',
        'sort' => 100,
        'icon' => 'heroicon-o-document-text',
    ],
    
    // Date format
    'date_format' => 'Y-m-d H:i:s',
    
    // Log level colors
    'levels' => [
        'emergency' => ['label' => 'Emergency', 'color' => 'danger'],
        'alert' => ['label' => 'Alert', 'color' => 'danger'],
        'critical' => ['label' => 'Critical', 'color' => 'danger'],
        'error' => ['label' => 'Error', 'color' => 'danger'],
        'warning' => ['label' => 'Warning', 'color' => 'warning'],
        'notice' => ['label' => 'Notice', 'color' => 'info'],
        'info' => ['label' => 'Info', 'color' => 'success'],
        'debug' => ['label' => 'Debug', 'color' => 'gray'],
    ],
];

Features Detail

Log File Management

  • View All Logs: Browse all log files in storage/logs with file size and last modified date
  • Delete Logs: Remove individual or multiple log files
  • Empty Logs: Clear log file contents without deleting the file

Log Viewing & Filtering

  • Detailed View: Click "View" on any log file to see parsed entries
  • Filter by Level: Filter logs by severity (emergency, alert, critical, error, warning, notice, info, debug)
  • Date Range Filter: Filter logs by timestamp range
  • Search: Global search across log messages and context
  • Auto-refresh: Log viewer automatically refreshes every 30 seconds

Log Entry Display

Each log entry shows:

  • Timestamp
  • Log level (color-coded badge)
  • Environment
  • Message
  • Context and stack traces (expandable)

Performance

  • Large files (>10MB) are automatically handled with optimized reading
  • Only the most recent entries are loaded for very large files
  • Pagination prevents memory issues
  • Configurable per-page limits

License

MIT License

munch/filament-logviewer 适用场景与选型建议

munch/filament-logviewer 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 41 次下载、GitHub Stars 达 0, 最近一次更新时间为 2026 年 01 月 13 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「admin」 「laravel」 「logs」 「logviewer」 「filament」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 munch/filament-logviewer 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 munch/filament-logviewer 我们能提供哪些服务?
定制开发 / 二次开发

基于 munch/filament-logviewer 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 41
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 18
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-01-13