PluginProbe ʕ •ᴥ•ʔ
ShareThis Dashboard for Google Analytics / trunk
ShareThis Dashboard for Google Analytics vtrunk
3.3.2 trunk 1.0.7 2.0.0 2.0.1 2.0.2 2.0.3 2.0.4 2.0.5 2.1 2.1.2 2.1.3 2.1.4 2.1.5 2.2.5 2.3.5 2.3.6 2.3.7 2.3.8 2.4.0 2.4.1 2.5.0 2.5.1 2.5.2 2.5.3 2.5.4 2.5.5 3.0.0 3.1.0 3.1.1 3.1.2 3.1.3 3.1.4 3.1.5 3.1.6 3.1.7 3.2.0 3.2.1 3.2.2 3.2.3 3.2.4 3.3.0 3.3.1
googleanalytics / lib / analytics-admin / vendor / psr / log / Psr / Log / AbstractLogger.php
googleanalytics / lib / analytics-admin / vendor / psr / log / Psr / Log Last commit date
Test 3 years ago AbstractLogger.php 3 years ago InvalidArgumentException.php 3 years ago LogLevel.php 3 years ago LoggerAwareInterface.php 3 years ago LoggerAwareTrait.php 3 years ago LoggerInterface.php 3 years ago LoggerTrait.php 3 years ago NullLogger.php 3 years ago
AbstractLogger.php
129 lines
1 <?php
2
3 namespace Psr\Log;
4
5 /**
6 * This is a simple Logger implementation that other Loggers can inherit from.
7 *
8 * It simply delegates all log-level-specific methods to the `log` method to
9 * reduce boilerplate code that a simple Logger that does the same thing with
10 * messages regardless of the error level has to implement.
11 */
12 abstract class AbstractLogger implements LoggerInterface
13 {
14 /**
15 * System is unusable.
16 *
17 * @param string $message
18 * @param mixed[] $context
19 *
20 * @return void
21 */
22 public function emergency($message, array $context = array())
23 {
24 $this->log(LogLevel::EMERGENCY, $message, $context);
25 }
26
27 /**
28 * Action must be taken immediately.
29 *
30 * Example: Entire website down, database unavailable, etc. This should
31 * trigger the SMS alerts and wake you up.
32 *
33 * @param string $message
34 * @param mixed[] $context
35 *
36 * @return void
37 */
38 public function alert($message, array $context = array())
39 {
40 $this->log(LogLevel::ALERT, $message, $context);
41 }
42
43 /**
44 * Critical conditions.
45 *
46 * Example: Application component unavailable, unexpected exception.
47 *
48 * @param string $message
49 * @param mixed[] $context
50 *
51 * @return void
52 */
53 public function critical($message, array $context = array())
54 {
55 $this->log(LogLevel::CRITICAL, $message, $context);
56 }
57
58 /**
59 * Runtime errors that do not require immediate action but should typically
60 * be logged and monitored.
61 *
62 * @param string $message
63 * @param mixed[] $context
64 *
65 * @return void
66 */
67 public function error($message, array $context = array())
68 {
69 $this->log(LogLevel::ERROR, $message, $context);
70 }
71
72 /**
73 * Exceptional occurrences that are not errors.
74 *
75 * Example: Use of deprecated APIs, poor use of an API, undesirable things
76 * that are not necessarily wrong.
77 *
78 * @param string $message
79 * @param mixed[] $context
80 *
81 * @return void
82 */
83 public function warning($message, array $context = array())
84 {
85 $this->log(LogLevel::WARNING, $message, $context);
86 }
87
88 /**
89 * Normal but significant events.
90 *
91 * @param string $message
92 * @param mixed[] $context
93 *
94 * @return void
95 */
96 public function notice($message, array $context = array())
97 {
98 $this->log(LogLevel::NOTICE, $message, $context);
99 }
100
101 /**
102 * Interesting events.
103 *
104 * Example: User logs in, SQL logs.
105 *
106 * @param string $message
107 * @param mixed[] $context
108 *
109 * @return void
110 */
111 public function info($message, array $context = array())
112 {
113 $this->log(LogLevel::INFO, $message, $context);
114 }
115
116 /**
117 * Detailed debug information.
118 *
119 * @param string $message
120 * @param mixed[] $context
121 *
122 * @return void
123 */
124 public function debug($message, array $context = array())
125 {
126 $this->log(LogLevel::DEBUG, $message, $context);
127 }
128 }
129