mirror of
https://github.com/friendica/friendica
synced 2025-04-27 15:10:11 +00:00
LoggerFactory returns same object
This commit is contained in:
parent
9bcb470caa
commit
4a8533aa11
2 changed files with 14 additions and 1 deletions
|
@ -17,8 +17,14 @@ use Psr\Log\NullLogger;
|
|||
*/
|
||||
final class LoggerFactory
|
||||
{
|
||||
private LoggerInterface $logger;
|
||||
|
||||
public function create(): LoggerInterface
|
||||
{
|
||||
return new NullLogger();
|
||||
if (! isset($this->logger)) {
|
||||
$this->logger = new NullLogger();
|
||||
}
|
||||
|
||||
return $this->logger;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue