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