|  Download Simple psr loggerInstallationcomposer require mateodioev/simple-logger
 Usageuse SimpleLogger\Logger;
use SimpleLogger\streams\{CollectionStream, FileStream, StdoutStream};
$logger = new Logger(stream: new CollectionStream([
    new StdoutStream(),
    FileStream::async(__DIR__ . '/log.log'),
]));
$logger->debug('The debug message');
 Creating a new streamA stream is a class that implements the SimpleLogger\streams\LogStreaminterface. You can create your own stream by implementing thewritemethod. use SimpleLogger\streams\LogStream;
class MyStream implements LogStream
{
    public function write(LogResult $message): void
    {
        // Write the message
    }
}
 |