onamfc/laravel-devlogger-dashboard
Composer 安装命令:
composer require onamfc/laravel-devlogger-dashboard
包简介
A beautiful dashboard for managing Laravel DevLogger records with IDE integration
README 文档
README
A beautiful, feature-rich dashboard for managing Laravel DevLogger records with IDE integration and advanced filtering capabilities.
Features
- Stunning UI - Modern, responsive design with dark mode support
- Advanced Search & Filtering - Search by message, exception class, file path, level, status, and date range
- IDE Integration - Click to open files directly in your IDE (VS Code, PhpStorm, Sublime, Atom)
- Real-time Statistics - Dashboard overview with log counts and status summaries
- Secure Access - Environment-based access control with authentication and authorization
- Live Updates - Built with Laravel Livewire for reactive user experience
- Mobile Responsive - Works perfectly on all device sizes
- Dark Mode - Beautiful dark theme with automatic persistence
Requirements
- PHP 8.1+
- Laravel 10.0+, 11.0+ or 12.0+
- Laravel Livewire 3.0+
onamfc/laravel-devloggerpackage
Installation
- Install the package via Composer:
composer require onamfc/laravel-devlogger-dashboard
- Publish the configuration file:
php artisan vendor:publish --tag=devlogger-dashboard-config
- (Optional) Publish the views for customization:
php artisan vendor:publish --tag=devlogger-dashboard-views
- (Optional) Publish the assets:
php artisan vendor:publish --tag=devlogger-dashboard-assets
Configuration
The package configuration is located at config/devlogger-dashboard.php. Key configuration options include:
Environment Access Control
'allowed_environments' => [ 'local', 'staging', 'development' ],
Authentication & Authorization
'require_auth' => env('DEVLOGGER_DASHBOARD_AUTH', true), 'authorization_gate' => env('DEVLOGGER_DASHBOARD_GATE', null), 'allowed_ips' => env('DEVLOGGER_DASHBOARD_IPS') ? explode(',', env('DEVLOGGER_DASHBOARD_IPS')) : [],
IDE Integration
'ide' => [ 'default' => env('DEVLOGGER_IDE', 'vscode'), 'handlers' => [ 'vscode' => 'vscode://file/{file}:{line}', 'phpstorm' => 'phpstorm://open?file={file}&line={line}', 'sublime' => 'subl://open?url=file://{file}&line={line}', 'atom' => 'atom://core/open/file?filename={file}&line={line}', ] ],
Environment Variables
Add these to your .env file:
# Dashboard Configuration DEVLOGGER_DASHBOARD_PREFIX=devlogger DEVLOGGER_DASHBOARD_AUTH=true DEVLOGGER_DASHBOARD_GATE=null DEVLOGGER_DASHBOARD_IPS= # IDE Configuration DEVLOGGER_IDE=vscode DEVLOGGER_BASE_PATH=/path/to/your/project DEVLOGGER_SHOW_FILE_PREVIEW=true # UI Configuration DEVLOGGER_THEME=dark DEVLOGGER_BRAND_NAME="DevLogger Dashboard" DEVLOGGER_AUTO_REFRESH=false
Usage
Accessing the Dashboard
Once installed, visit /devlogger in your browser (or your configured route prefix). The dashboard will only be accessible in allowed environments and to authenticated users.
IDE Integration Setup
VS Code
- Install the "Open in Application" extension or similar
- The dashboard will generate
vscode://file/path/to/file:lineURLs - Click any file path in the dashboard to open it directly in VS Code
PhpStorm
- Enable "Remote call" in PhpStorm settings
- The dashboard will generate
phpstorm://open?file=path&line=numberURLs - Click any file path to open it in PhpStorm
Other IDEs
Configure your IDE to handle custom URL schemes, or use the "Copy Path" button as a fallback.
Authorization Gates
You can create a custom authorization gate to control dashboard access:
// In your AuthServiceProvider Gate::define('access-devlogger-dashboard', function ($user) { return $user->hasRole('developer') || $user->email === 'admin@example.com'; });
Then set in your .env:
DEVLOGGER_DASHBOARD_GATE=access-devlogger-dashboard
Custom Middleware
The package includes DevLoggerDashboardMiddleware which handles:
- Environment checking
- IP allowlisting
- Authentication verification
- Authorization gate checking
You can extend or replace this middleware by binding your own implementation.
Features Overview
Dashboard Statistics
- Total log count
- Today's logs
- Error and warning counts
- Open vs resolved status counts
Advanced Filtering
- Search across message, exception class, file path, and request URL
- Filter by log level (emergency, alert, critical, error, warning, notice, info, debug)
- Filter by status (open, resolved)
- Date range filtering
- Sortable columns
Log Management
- View detailed log information
- Mark logs as resolved or reopen them
- Delete individual logs or bulk delete
- Copy file paths to clipboard
- Open files directly in your IDE
File Preview
- View code context around the error line
- Syntax highlighting for better readability
- Highlighted target line where the error occurred
Security Considerations
- Environment Restriction: Only accessible in configured environments
- Authentication Required: Users must be logged in (configurable)
- Authorization Gates: Optional fine-grained access control
- IP Allowlisting: Optional IP-based access restriction
- No Public Access: Designed specifically for development environments
Customization
Views
Publish the views to customize the UI:
php artisan vendor:publish --tag=devlogger-dashboard-views
Views will be published to resources/views/vendor/devlogger-dashboard/.
Styling
The dashboard uses Tailwind CSS with a custom configuration. You can override styles by publishing the views and modifying the templates.
Adding Custom Actions
You can extend the Livewire components to add custom functionality:
// Create your own component extending the base class CustomLogDashboard extends \Onamfc\DevLoggerDashboard\Http\Livewire\LogDashboard { public function customAction() { // Your custom logic here } }
API Reference
Services
IdeService
Handles IDE URL generation:
$ideService = app(\Onamfc\DevLoggerDashboard\Services\IdeService::class); $url = $ideService->generateIdeUrl('/path/to/file.php', 123);
FileService
Handles file preview generation:
$fileService = app(\Onamfc\DevLoggerDashboard\Services\FileService::class); $preview = $fileService->getFilePreview('/path/to/file.php', 123, 10);
Troubleshooting
Dashboard Not Accessible
- Check that you're in an allowed environment
- Verify authentication is working
- Check IP allowlist configuration
- Ensure the route prefix is correct
IDE Links Not Working
- Verify your IDE supports custom URL schemes
- Check the IDE configuration in the config file
- Ensure file paths are absolute
- Try the "Copy Path" fallback option
File Previews Not Showing
- Check file permissions
- Verify the base path configuration
- Ensure files exist at the specified paths
- Check the
show_previewconfiguration
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
This package is open-sourced software licensed under the MIT license.
Support
If you encounter any issues or have questions, please open an issue on the GitHub repository.
onamfc/laravel-devlogger-dashboard 适用场景与选型建议
onamfc/laravel-devlogger-dashboard 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 10 次下载、GitHub Stars 达 5, 最近一次更新时间为 2025 年 07 月 14 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「logging」 「debugging」 「laravel」 「dashboard」 「livewire」 「devlogger」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 onamfc/laravel-devlogger-dashboard 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 onamfc/laravel-devlogger-dashboard 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 onamfc/laravel-devlogger-dashboard 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
A PHP package that takes a snapshot of your application and allows you to retrieve it later to help with debugging.
A Zend Framework module that sets up Monolog for logging in applications.
Laravel Database Query Logger and debug helper.
Asynchronous Sentry for Symfony - Fire and forget
Stackdriver handler for Monolog (codeinternetapplications/monolog-stackdriver Fork).
High-performance, zero-dependency PSR-3 logger for MonkeysLegion with structured logging, handlers, processors, and PHP 8.4 features.
统计信息
- 总下载量: 10
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 5
- 点击次数: 6
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-07-14