update project

This commit is contained in:
root
2026-05-30 01:11:35 -04:00
parent 3a0628ecc7
commit 2225f6bc72
9743 changed files with 1122482 additions and 59 deletions
+32
View File
@@ -0,0 +1,32 @@
<?php
namespace Laravel\Pail;
use Monolog\Formatter\JsonFormatter;
use Monolog\Handler\StreamHandler;
use Monolog\Level;
use Monolog\Logger;
use Psr\Log\LoggerInterface;
class LoggerFactory
{
/**
* Creates a new instance of the logger factory.
*/
public function __construct(
protected File $file,
) {
//
}
/**
* Creates a new instance of the logger.
*/
public function create(): LoggerInterface
{
$handler = new StreamHandler($this->file->__toString(), Level::Debug, true, null, true);
$handler->setFormatter(new JsonFormatter);
return new Logger('pail', [$handler]);
}
}