1 | <?php |
||
5 | class LogStatic |
||
6 | { |
||
7 | /** |
||
8 | * @var Log |
||
9 | */ |
||
10 | protected static $instance; |
||
11 | |||
12 | /** |
||
13 | * log event information into file |
||
14 | * |
||
15 | * @param string $level |
||
16 | * @param array|string $message |
||
17 | * @param array $context |
||
18 | * @param array $params |
||
19 | */ |
||
20 | public static function log($level, $message, array $context = [], array $params = []) |
||
25 | |||
26 | /** |
||
27 | * log event information into file |
||
28 | * |
||
29 | * @param array|string $message |
||
30 | * @param array $context |
||
31 | * @param array $params |
||
32 | */ |
||
33 | public static function makeLog($message, array $context = [], array $params = []) |
||
38 | |||
39 | /** |
||
40 | * set log option for all future executions of makeLog |
||
41 | * |
||
42 | * @param string $key |
||
43 | * @param mixed $val |
||
44 | * @return Log |
||
45 | */ |
||
46 | public static function setOption($key, $val) |
||
51 | |||
52 | /** |
||
53 | * return all configuration or only given key value |
||
54 | * |
||
55 | * @param null|string $key |
||
56 | * @return array|mixed |
||
57 | */ |
||
58 | public static function getOption($key = null) |
||
63 | |||
64 | /** |
||
65 | * create Log object if not exists |
||
66 | * |
||
67 | * @param array $params |
||
68 | */ |
||
69 | protected static function init(array $params = []) |
||
75 | } |
||
76 |