ibrahim-eng12/log-owl
Composer 安装命令:
composer require ibrahim-eng12/log-owl
包简介
A Laravel package to view, navigate, filter logs with descriptions and solutions
README 文档
README
A Laravel package to view, navigate, and filter application logs with intelligent error descriptions and suggested solutions.
Gallery
Features
- 📋 View and navigate Laravel log files
- 🔍 Filter logs by level, date range, and search terms
- 📊 Statistics dashboard showing error counts by level and type
- 💡 Intelligent error analysis with descriptions and solutions
- 🌍 Multi-language support (English & Arabic)
- 🔄 RTL (Right-to-Left) layout support for Arabic
- 🎨 Clean, responsive UI
- 🔐 Protected with authentication middleware
- 📥 Download and clear log files
- 📱 Mobile-friendly interface
Installation
1. Install via Composer
composer require ibrahim-eng12/log-owl
2. Publish Configuration (Optional)
php artisan vendor:publish --tag=log-viewer-config
3. Publish Views (Optional)
php artisan vendor:publish --tag=log-viewer-views
4. Publish Translations (Optional)
php artisan vendor:publish --tag=log-viewer-lang
5. Publish Assets - Logo (Optional)
php artisan vendor:publish --tag=log-owl-assets
This will publish the logo to public/vendor/log-owl/logo.png.
Configuration
After publishing the configuration, you can modify config/log-viewer.php:
return [ // URL prefix for log viewer routes 'route_prefix' => 'logs', // Middleware applied to all routes 'middleware' => ['web', 'auth'], // Path to log files 'log_path' => storage_path('logs'), // Logs per page 'per_page' => 25, // Restrict to specific users (empty = all authenticated) 'allowed_users' => [], // Allow clearing log files 'allow_clear' => true, // Allow downloading log files 'allow_download' => true, // Default locale (null = use app locale) 'locale' => null, // Available locales for the language switcher 'available_locales' => [ 'en' => 'English', 'ar' => 'Arabic', ], ];
Usage
After installation, navigate to /logs in your browser (while authenticated) to access LogOwl.
Routes
| Route | Method | Description |
|---|---|---|
/logs |
GET | View logs dashboard |
/logs/show/{id} |
GET | Get log entry details (JSON) |
/logs/clear |
POST | Clear current log file |
/logs/download |
GET | Download current log file |
/logs/set-locale |
POST | Change language (stored in session) |
Filtering Logs
- By Level: Filter by emergency, alert, critical, error, warning, notice, info, debug
- By Search: Search within log messages and error types
- By Date: Filter by date range
Supported Error Types
LogOwl recognizes and provides solutions for common Laravel errors:
- Database Errors: Connection issues, missing tables/columns, duplicates
- Authentication Errors: Unauthenticated access, CSRF mismatches
- File Errors: Permission denied, file not found
- View Errors: Missing Blade templates
- Class/Method Errors: Class not found, undefined methods
- Route Errors: Route not defined, method not allowed, 404
- Memory/Timeout Errors: Memory exhausted, execution timeout
- Queue Errors: Failed jobs, max attempts exceeded
- Cache/Session Errors: Store not configured
- Mail Errors: Transport failures
- And many more...
Multi-Language Support
LogOwl supports multiple languages with a built-in language switcher. Currently supported languages:
- English (en) - Default
- Arabic (ar) - With full RTL support
Changing the Default Language
Set the default locale in your configuration:
'locale' => 'ar', // Set Arabic as default
Or leave it as null to use your application's current locale.
Adding a New Language
- Publish the translation files:
php artisan vendor:publish --tag=log-viewer-lang
-
Copy one of the existing language files (e.g.,
en/log-viewer.php) to a new folder with your language code (e.g.,fr/log-viewer.php) -
Translate all strings in the new file
-
Add the new locale to your configuration:
'available_locales' => [ 'en' => 'English', 'ar' => 'Arabic', 'fr' => 'French', ],
RTL Support
The interface automatically switches to RTL (Right-to-Left) layout when Arabic is selected. The RTL detection is based on the current locale.
Customization
Adding Custom Error Patterns
Extend the LogParser service to add custom error patterns:
use Ibrah\LaravelLogViewer\Services\LogParser; class CustomLogParser extends LogParser { protected array $errorPatterns = [ // Add your custom patterns (pattern => translation_key) 'MyCustomException' => 'my_custom_error', // ... parent patterns will be inherited ]; }
Then add the translation key to your language files:
// resources/lang/vendor/log-viewer/en/log-viewer.php 'error_types' => [ 'my_custom_error' => [ 'type' => 'Custom Error', 'description' => 'Description of the error.', 'solutions' => [ 'Solution 1', 'Solution 2', ], ], // ... other error types ],
Register in a service provider:
$this->app->singleton(LogParser::class, CustomLogParser::class);
Custom Views
Publish and modify the views:
php artisan vendor:publish --tag=log-viewer-views
Views will be published to resources/views/vendor/log-viewer/.
Security
- All routes are protected by the
authmiddleware by default - Configure
allowed_usersto restrict access to specific users - Disable
allow_clearandallow_downloadin production if needed
Requirements
- PHP 8.1+
- Laravel 10.0, 11.0, or 12.0
License
ibrahim-eng12/log-owl 适用场景与选型建议
ibrahim-eng12/log-owl 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 11 次下载、GitHub Stars 达 6, 最近一次更新时间为 2026 年 02 月 03 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「debug」 「laravel」 「logs」 「error-handling」 「Viewer」 「logowl」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 ibrahim-eng12/log-owl 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 ibrahim-eng12/log-owl 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 ibrahim-eng12/log-owl 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Debug your SimpleBus EventBus and CommandBus
nice output for debug functions for PHP 5.3
The tenancy/tenancy logs mutations
Analysis module for finding problematical shop data.
Twig extensions for Tracy Debugger
Laravel 5.x.x library for integration Monolog Sentry
统计信息
- 总下载量: 11
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 6
- 点击次数: 31
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-02-03


