woocommerce
/
packages
/
email-editor
/
src
/
Engine
/
Logger
/
class-email-editor-logger-interface.php
class-default-email-editor-logger.php
10 months ago
class-email-editor-logger-interface.php
1 year ago
class-email-editor-logger.php
1 year ago
class-email-editor-logger-interface.php
99 lines
| 1 | <?php |
| 2 | /** |
| 3 | * This file is part of the WooCommerce Email Editor package. |
| 4 | * |
| 5 | * @package Automattic\WooCommerce\EmailEditor |
| 6 | */ |
| 7 | |
| 8 | declare(strict_types = 1); |
| 9 | |
| 10 | namespace Automattic\WooCommerce\EmailEditor\Engine\Logger; |
| 11 | |
| 12 | /** |
| 13 | * Interface for email editor loggers. |
| 14 | */ |
| 15 | interface Email_Editor_Logger_Interface { |
| 16 | /** |
| 17 | * System is unusable. |
| 18 | * |
| 19 | * @param string $message The log message. |
| 20 | * @param array $context The log context. |
| 21 | * @return void |
| 22 | */ |
| 23 | public function emergency( string $message, array $context = array() ): void; |
| 24 | |
| 25 | /** |
| 26 | * Action must be taken immediately. |
| 27 | * |
| 28 | * @param string $message The log message. |
| 29 | * @param array $context The log context. |
| 30 | * @return void |
| 31 | */ |
| 32 | public function alert( string $message, array $context = array() ): void; |
| 33 | |
| 34 | /** |
| 35 | * Critical conditions. |
| 36 | * |
| 37 | * @param string $message The log message. |
| 38 | * @param array $context The log context. |
| 39 | * @return void |
| 40 | */ |
| 41 | public function critical( string $message, array $context = array() ): void; |
| 42 | |
| 43 | /** |
| 44 | * Runtime errors that do not require immediate action but should typically |
| 45 | * be logged and monitored. |
| 46 | * |
| 47 | * @param string $message The log message. |
| 48 | * @param array $context The log context. |
| 49 | * @return void |
| 50 | */ |
| 51 | public function error( string $message, array $context = array() ): void; |
| 52 | |
| 53 | /** |
| 54 | * Exceptional occurrences that are not errors. |
| 55 | * |
| 56 | * @param string $message The log message. |
| 57 | * @param array $context The log context. |
| 58 | * @return void |
| 59 | */ |
| 60 | public function warning( string $message, array $context = array() ): void; |
| 61 | |
| 62 | /** |
| 63 | * Normal but significant events. |
| 64 | * |
| 65 | * @param string $message The log message. |
| 66 | * @param array $context The log context. |
| 67 | * @return void |
| 68 | */ |
| 69 | public function notice( string $message, array $context = array() ): void; |
| 70 | |
| 71 | /** |
| 72 | * Interesting events. |
| 73 | * |
| 74 | * @param string $message The log message. |
| 75 | * @param array $context The log context. |
| 76 | * @return void |
| 77 | */ |
| 78 | public function info( string $message, array $context = array() ): void; |
| 79 | |
| 80 | /** |
| 81 | * Detailed debug information. |
| 82 | * |
| 83 | * @param string $message The log message. |
| 84 | * @param array $context The log context. |
| 85 | * @return void |
| 86 | */ |
| 87 | public function debug( string $message, array $context = array() ): void; |
| 88 | |
| 89 | /** |
| 90 | * Logs with an arbitrary level. |
| 91 | * |
| 92 | * @param string $level The log level. |
| 93 | * @param string $message The log message. |
| 94 | * @param array $context The log context. |
| 95 | * @return void |
| 96 | */ |
| 97 | public function log( string $level, string $message, array $context = array() ): void; |
| 98 | } |
| 99 |