2020-03-11 20:29:08 +00:00
|
|
|
<?php
|
2020-03-15 21:21:11 +00:00
|
|
|
|
2020-03-11 20:29:08 +00:00
|
|
|
namespace App\Util;
|
|
|
|
|
|
|
|
use Psr\Log\LoggerInterface;
|
|
|
|
|
|
|
|
class Log
|
|
|
|
{
|
|
|
|
private static ?LoggerInterface $logger;
|
|
|
|
|
|
|
|
public static function setLogger($l): void
|
|
|
|
{
|
|
|
|
self::$logger = $l;
|
|
|
|
}
|
2020-03-15 21:21:11 +00:00
|
|
|
|
2020-03-11 20:29:08 +00:00
|
|
|
public static function error(string $msg): void
|
|
|
|
{
|
|
|
|
self::$logger->error($msg);
|
|
|
|
}
|
2020-03-15 21:21:11 +00:00
|
|
|
|
2020-03-11 20:29:08 +00:00
|
|
|
public static function info(string $msg): void
|
|
|
|
{
|
|
|
|
self::$logger->info($msg);
|
|
|
|
}
|
2020-03-15 21:21:11 +00:00
|
|
|
|
2020-03-11 20:29:08 +00:00
|
|
|
public static function debug(string $msg): void
|
|
|
|
{
|
|
|
|
$logger->debug($msg);
|
|
|
|
}
|
|
|
|
}
|