laravel/nova-log-viewer
View and search your Laravel application logs directly inside Laravel Nova. Nova Log Viewer adds a simple tool UI with real-time polling support, making it easy to inspect errors, stack traces, and recent log entries without leaving the admin panel.
tools() method in NovaServiceProvider), ensuring consistency in UI/UX and authentication.laravel/nova-log-viewer).NovaServiceProvider::tools().single, daily, syslog), but performance varies (e.g., single files may be slower for large logs).| Risk | Severity | Mitigation |
|---|---|---|
| Nova Version Lock-in | High | Monitor Nova’s backward compatibility; test upgrades early. |
| Polling Performance | Medium | Benchmark with high log volumes; adjust LOG_VIEWER_POLLING_INTERVAL. |
| Log File Permissions | Medium | Ensure Nova’s storage permissions align with Laravel’s log directory. |
| Customization Limits | Low | Fork the package or extend via Nova’s tool API if UI/UX changes are needed. |
| Security Gaps | Low | No built-in RBAC for log access; rely on Nova’s existing auth (e.g., roles/gates). |
tail -f or log:view commands.spatie/laravel-log-viewer (CLI-focused).nova-log-viewer requires Nova 4+).daily vs. single files).composer require laravel/nova-log-viewer
// app/Providers/NovaServiceProvider.php
public function tools()
{
return [
\Laravel\Nova\LogViewer\LogViewer::make()
->withPollingInterval(10), // Customize interval (seconds)
];
}
php artisan vendor:publish --tag=nova-log-viewer
| Component | Supported Versions | Notes |
|---|---|---|
| Laravel | 8.x–13.x | Tested explicitly in releases. |
| Nova | 4.x+ (latest: 5.7.7+) | Requires Nova 5 for v1.1.0+. |
| Log Drivers | single, daily, syslog, etc. |
Performance varies; single files may lag with >10K entries. |
| Browser | Modern (Nova’s Vue.js requirements) | Ensure compatibility with team’s browser support policy. |
| PHP | 8.0+ | Aligns with Laravel 8+ requirements. |
laravel.log).LOG_VIEWER_POLLING_INTERVAL if needed.laravel/nova and laravel/framework for breaking changes.laravel/nova, laravel/framework.php artisan vendor:publish for UI changes.| Issue | Root Cause | Solution |
|---|---|---|
| Log viewer blank/403 | Auth middleware missing | Ensure Authenticate middleware is registered (fixed in v1.2.0). |
| Polling timeouts | High log volume or slow I/O | Reduce polling interval or optimize log drivers. |
| "File not found" errors | Log file permissions | Run chmod -R 755 storage/logs. |
| UI lag with large logs | Frontend rendering overhead | Filter logs by level/keyword before viewing. |
LOG_VIEWER_POLLING_INTERVAL=10 (default) or disableHow can I help you explore Laravel packages today?