File-based logging driver --- writes log messages to disk with daily or size-based rotation.
composer require marko/log-fileuse Marko\Log\Contracts\LoggerInterface;
class ImportService
{
public function __construct(
private LoggerInterface $logger,
) {}
public function import(string $file): void
{
$this->logger->info('Starting import', ['file' => $file]);
}
}Full usage, API reference, and examples: marko/log-file