Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | n/a |
0 / 0 |
n/a |
0 / 0 |
CRAP | n/a |
0 / 0 |
1 | <?php |
2 | /** |
3 | * Pop PHP Framework (http://www.popphp.org/) |
4 | * |
5 | * @link https://github.com/popphp/popphp-framework |
6 | * @author Nick Sagona, III <dev@nolainteractive.com> |
7 | * @copyright Copyright (c) 2009-2024 NOLA Interactive, LLC. (http://www.nolainteractive.com) |
8 | * @license http://www.popphp.org/license New BSD License |
9 | */ |
10 | |
11 | /** |
12 | * @namespace |
13 | */ |
14 | namespace Pop\Log\Writer; |
15 | |
16 | /** |
17 | * Log writer interface |
18 | * |
19 | * @category Pop |
20 | * @package Pop\Log |
21 | * @author Nick Sagona, III <dev@nolainteractive.com> |
22 | * @copyright Copyright (c) 2009-2024 NOLA Interactive, LLC. (http://www.nolainteractive.com) |
23 | * @license http://www.popphp.org/license New BSD License |
24 | * @version 4.0.0 |
25 | */ |
26 | interface WriterInterface |
27 | { |
28 | |
29 | /** |
30 | * Set log limit |
31 | * |
32 | * @param int $level |
33 | * @return WriterInterface |
34 | */ |
35 | public function setLogLimit(int $level): WriterInterface; |
36 | |
37 | /** |
38 | * Get log limit |
39 | * |
40 | * @return int|null |
41 | */ |
42 | public function getLogLimit(): int|null; |
43 | |
44 | /** |
45 | * Has log limit |
46 | * |
47 | * @return bool |
48 | */ |
49 | public function hasLogLimit(): bool; |
50 | |
51 | /** |
52 | * Check if a log level is within the set log level limit |
53 | * |
54 | * @param int $level |
55 | * @return bool |
56 | */ |
57 | public function isWithinLogLimit(int $level): bool; |
58 | |
59 | /** |
60 | * Write to the log |
61 | * |
62 | * @param mixed $level |
63 | * @param string $message |
64 | * @param array $context |
65 | * @return WriterInterface |
66 | */ |
67 | public function writeLog(mixed $level, string $message, array $context = []): WriterInterface; |
68 | |
69 | /** |
70 | * Determine |
71 | * |
72 | * @param array $context |
73 | * @return string |
74 | */ |
75 | public function getContext(array $context = []): string; |
76 | |
77 | } |