7 use Psr\Log\LoggerInterface;
28 public function setLogger(?LoggerInterface $logger =
null) {
29 $this->logger = $logger;
59 if (
$message instanceof \Throwable) {
65 return $logged ??
true;
77 $this->
getLogger()->warning(
"Deprecated in {$version}: {$message}");
logDeprecatedMessage(string $message, string $version)
Sends a message about deprecated use of a function, view, etc.
getLogger()
Returns logger.
setLogger(?LoggerInterface $logger=null)
Set (or remove) the logger.
trait Loggable
Enables adding a logger.
log($level, $message, array $context=[])
Log a message.
static $_instance
Reference to the loaded Application.
static factory(?InputInterface $input=null, ?OutputInterface $output=null)
Build a new logger.