2020-03-12 05:29:08 +09:00
|
|
|
<?php
|
2020-03-16 06:21:11 +09:00
|
|
|
|
2020-03-12 05:29:08 +09: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-16 06:21:11 +09:00
|
|
|
|
2020-03-12 05:29:08 +09:00
|
|
|
public static function error(string $msg): void
|
|
|
|
{
|
|
|
|
self::$logger->error($msg);
|
|
|
|
}
|
2020-03-16 06:21:11 +09:00
|
|
|
|
2020-03-12 05:29:08 +09:00
|
|
|
public static function info(string $msg): void
|
|
|
|
{
|
|
|
|
self::$logger->info($msg);
|
|
|
|
}
|
2020-03-16 06:21:11 +09:00
|
|
|
|
2020-03-12 05:29:08 +09:00
|
|
|
public static function debug(string $msg): void
|
|
|
|
{
|
|
|
|
$logger->debug($msg);
|
|
|
|
}
|
|
|
|
}
|