Total Complexity | 5 |
Total Lines | 44 |
Duplicated Lines | 0 % |
Coverage | 78.26% |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
12 | class StuLogger |
||
13 | { |
||
14 | /** @var array<string, Logger> */ |
||
15 | private static array $loggers = []; |
||
16 | |||
17 | 4 | public static function log(string $message, LogTypeEnum $type = LogTypeEnum::DEFAULT): void |
|
18 | { |
||
19 | 4 | LogLevelEnum::INFO->log($message, self::getLogger($type)); |
|
20 | } |
||
21 | |||
22 | /** @param string|int|float $args */ |
||
23 | public static function logf(string $information, ...$args): void |
||
24 | { |
||
25 | self::log(vsprintf( |
||
26 | $information, |
||
27 | $args |
||
28 | )); |
||
29 | } |
||
30 | |||
31 | 6 | public static function getLogger(LogTypeEnum $type): Logger |
|
56 | } |
||
57 | } |
||
58 |