<?php
/**
* yf_logger as a Psr\Log\LoggerInterface, defined only when psr/log is loaded (composer or services/psr_log.php).
* Use it as _class('logger_psr').
*/
load('logger');
if (interface_exists('Psr\Log\LoggerInterface', false)) {
class yf_logger_psr extends yf_logger implements Psr\Log\LoggerInterface
{
// psr/log 3 declares ": void", psr/log 1 and 2 declare nothing; a return type is valid for both
public function emergency($message, array $context = []): void
{
parent::emergency($message, $context);
}
public function alert($message, array $context = []): void
{
parent::alert($message, $context);
}
public function critical($message, array $context = []): void
{
parent::critical($message, $context);
}
public function error($message, array $context = []): void
{
parent::error($message, $context);
}
public function warning($message, array $context = []): void
{
parent::warning($message, $context);
}
public function notice($message, array $context = []): void
{
parent::notice($message, $context);
}
public function info($message, array $context = []): void
{
parent::info($message, $context);
}
public function debug($message, array $context = []): void
{
parent::debug($message, $context);
}
public function log($level, $message, array $context = []): void
{
parent::log($level, $message, $context);
}
}
}