-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathLoggerUtility.php
53 lines (42 loc) · 1.2 KB
/
LoggerUtility.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<?php
declare(strict_types=1);
namespace libLogDNA;
use LogLevel;
/**
* Logger utility, faster and easy to understand.
*/
class LoggerUtility
{
public static function emergency(string $message): void
{
LogInstance::get()->ingestLog($message, LogLevel::EMERGENCY);
}
public static function alert(string $message): void
{
LogInstance::get()->ingestLog($message, LogLevel::ALERT);
}
public static function critical(string $message): void
{
LogInstance::get()->ingestLog($message, LogLevel::CRITICAL);
}
public static function error(string $message): void
{
LogInstance::get()->ingestLog($message, LogLevel::ERROR);
}
public static function warning(string $message): void
{
LogInstance::get()->ingestLog($message, LogLevel::WARNING);
}
public static function notice(string $message): void
{
LogInstance::get()->ingestLog($message, LogLevel::NOTICE);
}
public static function info(string $message): void
{
LogInstance::get()->ingestLog($message);
}
public static function debug(string $message): void
{
LogInstance::get()->ingestLog($message, LogLevel::DEBUG);
}
}