-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathLogger.php
65 lines (57 loc) · 1.29 KB
/
Logger.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
54
55
56
57
58
59
60
61
62
63
64
65
<?php
/*
* This file is part of the Koded package.
*
* (c) Mihail Binev <mihail@kodeart.com>
*
* Please view the LICENSE distributed with this source code
* for the full copyright and license information.
*
*/
namespace Koded\Logging;
use Koded\Logging\Processors\Processor;
use Psr\Log\LoggerInterface;
use Throwable;
/**
* Interface Logger
*
*/
interface Logger extends LoggerInterface
{
/*
*
* Log levels
*
*/
const EMERGENCY = 1;
const ALERT = 2;
const CRITICAL = 4;
const ERROR = 8;
const WARNING = 16;
const NOTICE = 32;
const INFO = 64;
const DEBUG = 128;
/**
* Add a log processor in the stack.
*
* @param Processor $processor Logger processor instance
*
* @return Logger
*/
public function attach(Processor $processor): Logger;
/**
* Detach a log processor from registered processors.
*
* @param Processor $processor The log processor to detach from the stack.
*
* @return Logger
*/
public function detach(Processor $processor): Logger;
/**
* @param Throwable $e
* @param Processor|null $processor [optional]
*
* @return void
*/
public function exception(Throwable $e, Processor $processor = null): void;
}