2022-06-17 17:51:59 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Psr\Log;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Basic Implementation of LoggerAwareInterface.
|
|
|
|
*/
|
|
|
|
trait LoggerAwareTrait
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* The logger instance.
|
|
|
|
*/
|
2022-12-19 14:56:05 +01:00
|
|
|
protected ?LoggerInterface $logger = null;
|
2022-06-17 17:51:59 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Sets a logger.
|
|
|
|
*/
|
2022-12-19 14:56:05 +01:00
|
|
|
public function setLogger(LoggerInterface $logger): void
|
2022-06-17 17:51:59 +02:00
|
|
|
{
|
|
|
|
$this->logger = $logger;
|
|
|
|
}
|
|
|
|
}
|