PluginProbe
WCPOS – Point of Sale (POS) plugin for WooCommerce / 1.10.20
WCPOS – Point of Sale (POS) plugin for WooCommerce v1.10.20
1.10.20 1.10.19 1.10.18 1.10.17 1.10.16 1.10.15 1.10.13 1.10.14 1.10.12 1.10.11 1.10.10 1.10.9 1.10.8 untagged-3d9b7ccddc54df87c672 1.10.7 1.10.6 1.10.5 1.10.3 1.10.4 1.10.2 1.10.1 1.10.0 1.9.17 1.9.15 1.9.16 All 164 releases
woocommerce-pos / vendor_prefixed / psr / log / Psr / Log / LoggerTrait.php

LoggerTrait.php in WCPOS – Point of Sale (POS) plugin for WooCommerce 1.10.20, at vendor_prefixed/psr/log/Psr/Log/LoggerTrait.php

135 lines 3.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace WCPOS\Vendor\Psr\Log;
4
5 /**
6 * This is a simple Logger trait that classes unable to extend AbstractLogger
7 * (because they extend another class, etc) can include.
8 *
9 * It simply delegates all log-level-specific methods to the `log` method to
10 * reduce boilerplate code that a simple Logger that does the same thing with
11 * messages regardless of the error level has to implement.
12 */
13 trait LoggerTrait
14 {
15 /**
16 * System is unusable.
17 *
18 * @param string $message
19 * @param array $context
20 *
21 * @return void
22 */
23 public function emergency($message, array $context = array())
24 {
25 $this->log(LogLevel::EMERGENCY, $message, $context);
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 array $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 * Critical conditions.
44 *
45 * Example: Application component unavailable, unexpected exception.
46 *
47 * @param string $message
48 * @param array $context
49 *
50 * @return void
51 */
52 public function critical($message, array $context = array())
53 {
54 $this->log(LogLevel::CRITICAL, $message, $context);
55 }
56 /**
57 * Runtime errors that do not require immediate action but should typically
58 * be logged and monitored.
59 *
60 * @param string $message
61 * @param array $context
62 *
63 * @return void
64 */
65 public function error($message, array $context = array())
66 {
67 $this->log(LogLevel::ERROR, $message, $context);
68 }
69 /**
70 * Exceptional occurrences that are not errors.
71 *
72 * Example: Use of deprecated APIs, poor use of an API, undesirable things
73 * that are not necessarily wrong.
74 *
75 * @param string $message
76 * @param array $context
77 *
78 * @return void
79 */
80 public function warning($message, array $context = array())
81 {
82 $this->log(LogLevel::WARNING, $message, $context);
83 }
84 /**
85 * Normal but significant events.
86 *
87 * @param string $message
88 * @param array $context
89 *
90 * @return void
91 */
92 public function notice($message, array $context = array())
93 {
94 $this->log(LogLevel::NOTICE, $message, $context);
95 }
96 /**
97 * Interesting events.
98 *
99 * Example: User logs in, SQL logs.
100 *
101 * @param string $message
102 * @param array $context
103 *
104 * @return void
105 */
106 public function info($message, array $context = array())
107 {
108 $this->log(LogLevel::INFO, $message, $context);
109 }
110 /**
111 * Detailed debug information.
112 *
113 * @param string $message
114 * @param array $context
115 *
116 * @return void
117 */
118 public function debug($message, array $context = array())
119 {
120 $this->log(LogLevel::DEBUG, $message, $context);
121 }
122 /**
123 * Logs with an arbitrary level.
124 *
125 * @param mixed $level
126 * @param string $message
127 * @param array $context
128 *
129 * @return void
130 *
131 * @throws \Psr\Log\InvalidArgumentException
132 */
133 public abstract function log($level, $message, array $context = array());
134 }
135