-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSpecificLogTrait.php
More file actions
61 lines (47 loc) · 1.8 KB
/
SpecificLogTrait.php
File metadata and controls
61 lines (47 loc) · 1.8 KB
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
54
55
56
57
58
59
60
61
<?php
declare(strict_types=1);
namespace Productsup\CDE\ContainerApi;
trait SpecificLogTrait
{
public function debug(string $message, array $context = []): void
{
$this->log(ContainerApiInterface::LOG_LEVEL_DEBUG, $message, $context);
}
public function info(string $message, array $context = []): void
{
$this->log(ContainerApiInterface::LOG_LEVEL_INFO, $message, $context);
}
public function notice(string $message, array $context = []): void
{
$this->log(ContainerApiInterface::LOG_LEVEL_NOTICE, $message, $context);
}
public function warning(string $message, array $context = []): void
{
$this->log(ContainerApiInterface::LOG_LEVEL_WARNING, $message, $context);
}
public function error(string $message, array $context = []): void
{
$this->log(ContainerApiInterface::LOG_LEVEL_ERROR, $message, $context);
}
public function critical(string $message, array $context = []): void
{
$this->log(ContainerApiInterface::LOG_LEVEL_CRITICAL, $message, $context);
}
public function alert(string $message, array $context = []): void
{
$this->log(ContainerApiInterface::LOG_LEVEL_ALERT, $message, $context);
}
public function emergency(string $message, array $context = []): void
{
$this->log(ContainerApiInterface::LOG_LEVEL_EMERGENCY, $message, $context);
}
public function success(string $message, array $context = []): void
{
$this->log(ContainerApiInterface::LOG_LEVEL_SUCCESS, $message, $context);
}
public function report(string $message, array $context = []): void
{
$this->log(ContainerApiInterface::LOG_LEVEL_REPORT, $message, $context);
}
abstract public function log(string $level, string $message, array $context = []): void;
}