imamhsn195/laravel-system-logs
Composer 安装命令:
composer require imamhsn195/laravel-system-logs
包简介
A comprehensive Laravel package for viewing and managing system logs with an intuitive web interface
README 文档
README
A comprehensive Laravel package for viewing and managing system logs with an intuitive web interface.
Features
- 📋 View log entries from multiple files
- 🔍 Advanced filtering and search (channel, level, environment, date, text search)
- 🗑️ Delete single or bulk entries
- 📁 Recursive directory scanning with depth limits
- 🎨 Flexible layout support (works with any Laravel layout)
- 🔒 Security features (path validation, file size limits)
- 📱 Responsive design
- 🌐 Multi-language support
- ⚡ Real-time filtering via AJAX
Requirements
- PHP 8.1 or higher
- Laravel 10.x, 11.x, or 12.x
Installation
Via Packagist (Recommended)
composer require imamhsn195/laravel-system-logs
Via Composer (from GitHub)
If you need to install from the GitHub repository directly:
Add the repository to your composer.json:
{
"repositories": [
{
"type": "vcs",
"url": "https://github.com/imamhsn195/laravel-system-logs"
}
],
"require": {
"imamhsn195/laravel-system-logs": "dev-main"
}
}
Then run:
composer require imamhsn195/laravel-system-logs:dev-main
Configuration
Publish the configuration file:
php artisan vendor:publish --tag=system-logs-config
This will create config/system-logs.php where you can customize:
- Log directory path
- Route prefix and middleware
- Permission names
- UI layout
- Filter defaults
- Directory scanning options
- Security settings
Usage
Basic Usage
After installation, navigate to /admin/system-logs (or your configured prefix).
Custom Layout
The package supports any Laravel layout. Configure it in config/system-logs.php:
'ui' => [ 'layout' => 'layouts.app', // Your layout name 'title' => 'System Logs', ],
Permissions
The package uses Laravel's permission system. Configure permission names:
'permissions' => [ 'view' => 'system-log.view', 'delete' => 'system-log.delete', ],
Make sure to add these permissions to your permission system.
Publishing Assets
Publish CSS and JavaScript files:
php artisan vendor:publish --tag=system-logs-assets
Publishing Views (Optional)
If you want to customize the views:
php artisan vendor:publish --tag=system-logs-views
Publishing Translations (Optional)
If you want to customize translations:
php artisan vendor:publish --tag=system-logs-lang
Features
Filtering
- Channel: Filter by log channel (single, daily, stack, etc.)
- File: Filter by specific log file
- Level: Filter by log level (debug, info, warning, error, etc.)
- Environment: Filter by environment (local, production, etc.)
- Date: Filter entries by specific date
- Search: Full-text search across messages and context
Deletion
- Single Entry: Delete individual log entries
- Bulk Delete: Delete multiple selected entries
- Bulk Delete by Filters: Delete all entries matching current filters (with confirmation)
Recursive Scanning
The package can scan subdirectories recursively:
'scanning' => [ 'recursive' => true, 'max_depth' => 10, 'exclude_directories' => ['.git', 'node_modules', '.cache'], ],
Configuration Options
Log Directory
'log_directory' => storage_path('logs'),
Route Configuration
'route' => [ 'prefix' => 'admin/system-logs', 'middleware' => ['web', 'auth'], 'name_prefix' => 'system-logs.', ],
UI Configuration
'ui' => [ 'layout' => 'layouts.app', 'layout_type' => 'extend', 'section_name' => 'content', 'title' => 'System Logs', ],
Filter Defaults
'filters' => [ 'default_per_page' => 50, 'min_per_page' => 10, 'max_per_page' => 300, 'default_max_files' => 3, 'min_max_files' => 1, 'max_max_files' => 20, ],
API Routes
GET /admin/system-logs- View log entriesDELETE /admin/system-logs- Delete single entryDELETE /admin/system-logs/bulk- Bulk delete selected entriesDELETE /admin/system-logs/bulk-by-filters- Bulk delete by filters
Testing
./vendor/bin/phpunit
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Security
If you discover any security-related issues, please email imamhasan@example.com instead of using the issue tracker.
License
MIT License. See LICENSE file for details.
Author
Imam Hasan
- Website: imamhasan.me
- GitHub: @imamhsn195
- LinkedIn: in/imamhsn195
Support
If you find this package useful, please consider giving it a ⭐ on GitHub!
Changelog
Please see CHANGELOG for more information on what has changed recently.
imamhsn195/laravel-system-logs 适用场景与选型建议
imamhsn195/laravel-system-logs 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 5 次下载、GitHub Stars 达 0, 最近一次更新时间为 2026 年 01 月 22 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「laravel」 「logs」 「log-viewer」 「log-management」 「system-logs」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 imamhsn195/laravel-system-logs 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 imamhsn195/laravel-system-logs 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 imamhsn195/laravel-system-logs 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
The tenancy/tenancy logs mutations
A Laravel log viewer
Laravel 5.x.x library for integration Monolog Sentry
Pacote simplificado para persistência de logs
Change logs for orchid platform.
A beautiful, zero-dependency UI for querying and viewing AWS CloudWatch logs directly inside your Laravel application.
统计信息
- 总下载量: 5
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 19
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-01-22