codebuds/easyadmin-log-viewer-bundle
A Symfony bundle that provides a log viewer interface for EasyAdmin backends.
Install the bundle with Composer:
composer require codebuds/easyadmin-log-viewer-bundle
Symfony Flex should enable the bundle automatically. Without Flex, add it to config/bundles.php:
return [
// ...
CodeBuds\EasyAdminLogViewerBundle\EasyAdminLogViewerBundle::class => ['all' => true],
];
The bundle works out of the box. If needed, create config/packages/easy_admin_log_viewer.yaml to override the defaults:
easy_admin_log_viewer:
route_prefix: '/admin'
levels:
- { level: 'EMERGENCY', class: 'danger' }
- { level: 'CRITICAL', class: 'danger' }
- { level: 'ERROR', class: 'danger' }
- { level: 'ALERT', class: 'danger' }
- { level: 'WARNING', class: 'warning' }
- { level: 'NOTICE', class: 'info' }
- { level: 'INFO', class: 'info' }
- { level: 'DEBUG', class: 'secondary' }
The configured class values map directly to Bootstrap contextual classes such as primary, secondary, success, danger, warning, info, light, and dark.
Routes are imported automatically by the bundle. You can customize the route prefix like this:
easy_admin_log_viewer:
route_prefix: '/custom-admin'
Add the route to your EasyAdmin dashboard controller:
<?php
namespace App\Controller\Admin;
use EasyCorp\Bundle\EasyAdminBundle\Config\MenuItem;
use EasyCorp\Bundle\EasyAdminBundle\Controller\AbstractDashboardController;
class DashboardController extends AbstractDashboardController
{
#[\Override]
public function configureMenuItems(): iterable
{
// ...
yield MenuItem::linkToRoute('Logs', 'fa fa-file-alt', 'easy_admin_log_viewer_list')
->setPermission('ROLE_ADMIN');
// ...
}
}
Only users with ROLE_ADMIN can access the log viewer interface. Make sure your admin area is properly secured.




How can I help you explore Laravel packages today?