PluginProbe
UpdraftCentral Dashboard / 0.7.0
UpdraftCentral Dashboard v0.7.0
0.8.33 0.7.2 0.7.3 0.7.4 0.8.0 0.8.1 0.8.10 0.8.11 0.8.12 0.8.13 0.8.14 0.8.15 0.8.16 0.8.17 0.8.18 0.8.19 0.8.2 0.8.20 0.8.21 0.8.22 0.8.23 0.8.24 0.8.25 0.8.26 0.8.27 All 51 releases
updraftcentral / classes / class-updraft-logger-interface.php

class-updraft-logger-interface.php in UpdraftCentral Dashboard 0.7.0, at classes/class-updraft-logger-interface.php

116 lines 2.8 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 if (!defined('ABSPATH')) die('No direct access allowed');
4
5 if (class_exists('Updraft_Logger_Interface')) return false;
6
7 /**
8 * Describes a logger instance
9 *
10 * The message MUST be a string or object implementing __toString().
11 *
12 * The message MAY contain placeholders in the form: {foo} where foo
13 * will be replaced by the context data in key "foo".
14 *
15 * The context array can contain arbitrary data, the only assumption that
16 * can be made by implementors is that if an Exception instance is given
17 * to produce a stack trace, it MUST be in a key named "exception".
18 *
19 * See https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-3-logger-interface.md
20 * for the full interface specification.
21 */
22 interface Updraft_Logger_Interface {
23 /**
24 * System is unusable.
25 *
26 * @param string $message
27 * @param array $context
28 * @return null
29 */
30 public function emergency($message, array $context = array());
31
32 /**
33 * Action must be taken immediately.
34 *
35 * Example: Entire website down, database unavailable, etc. This should
36 * trigger the SMS alerts and wake you up.
37 *
38 * @param string $message
39 * @param array $context
40 * @return null
41 */
42 public function alert($message, array $context = array());
43
44 /**
45 * Critical conditions.
46 *
47 * Example: Application component unavailable, unexpected exception.
48 *
49 * @param string $message
50 * @param array $context
51 * @return null
52 */
53 public function critical($message, array $context = array());
54
55 /**
56 * Runtime errors that do not require immediate action but should typically
57 * be logged and monitored.
58 *
59 * @param string $message
60 * @param array $context
61 * @return null
62 */
63 public function error($message, array $context = array());
64
65 /**
66 * Exceptional occurrences that are not errors.
67 *
68 * Example: Use of deprecated APIs, poor use of an API, undesirable things
69 * that are not necessarily wrong.
70 *
71 * @param string $message
72 * @param array $context
73 * @return null
74 */
75 public function warning($message, array $context = array());
76
77 /**
78 * Normal but significant events.
79 *
80 * @param string $message
81 * @param array $context
82 * @return null
83 */
84 public function notice($message, array $context = array());
85
86 /**
87 * Interesting events.
88 *
89 * Example: User logs in, SQL logs.
90 *
91 * @param string $message
92 * @param array $context
93 * @return null
94 */
95 public function info($message, array $context = array());
96
97 /**
98 * Detailed debug information.
99 *
100 * @param string $message
101 * @param array $context
102 * @return null
103 */
104 public function debug($message, array $context = array());
105
106 /**
107 * Logs with an arbitrary level.
108 *
109 * @param mixed $level
110 * @param string $message
111 * @param array $context
112 * @return null
113 */
114 public function log($level, $message, array $context = array());
115 }
116