Skip to content

Solo LoggerPSR-3 Logger for PHP

Coordinated file rotation, standard error for containers, bounded context, and one line per record in line, JSON or logfmt format.

Solo Logger

Quick Example โ€‹

php
use Solo\Logger\Logger;

$logger = Logger::file('/var/log/app/app.log');

$logger->info('User {id} signed in', ['id' => 42]);
// [2026-11-01T09:30:00.123456+00:00] INFO: User 42 signed in {"id":42}

$logger->error('Payment failed', ['exception' => $exception, 'order_id' => 1001]);
// The exception is logged with its class, message, location, stack frames and previous exceptions.

Installation โ€‹

bash
composer require solophp/logger

Requirements: PHP 8.3+

Released under the MIT License.