Closed xdiegom closed 8 months ago
There's no need to set up loggers for every panel at the same time. It's better to set up loggers just for the panel you are using. Here's a simple way to do this in filament boot method:
public function panel(Panel $panel): Panel
{
return $panel
// ...
->bootUsing(function (Panel $panel) {
config([
'filament-activity-log.loggers.directory' => app_path('Filament/Loggers'),
'filament-activity-log.loggers.namespace' => 'App\\Filament\\Loggers',
]);
});
}
Some loggers may be needed only for specific filament admin panels rather than the default filament admin panel.
When loggers are created using
php artisan make:filament-logger
and having more than one panel, it asks where to create it, thus when trying to access the logger, this is not resolved because the directory and namespace are setup in config file only for the default admin panl.