@@ -22,104 +22,104 @@ interface LoggerInterface
2222 /**
2323 * System is unusable.
2424 *
25- * @param string $message
25+ * @param string|\Stringable $message
2626 * @param mixed[] $context
2727 *
2828 * @return void
2929 */
30- public function emergency ($ message , array $ context = array () );
30+ public function emergency (string | \ Stringable $ message , array $ context = [] );
3131
3232 /**
3333 * Action must be taken immediately.
3434 *
3535 * Example: Entire website down, database unavailable, etc. This should
3636 * trigger the SMS alerts and wake you up.
3737 *
38- * @param string $message
38+ * @param string|\Stringable $message
3939 * @param mixed[] $context
4040 *
4141 * @return void
4242 */
43- public function alert ($ message , array $ context = array () );
43+ public function alert (string | \ Stringable $ message , array $ context = [] );
4444
4545 /**
4646 * Critical conditions.
4747 *
4848 * Example: Application component unavailable, unexpected exception.
4949 *
50- * @param string $message
50+ * @param string|\Stringable $message
5151 * @param mixed[] $context
5252 *
5353 * @return void
5454 */
55- public function critical ($ message , array $ context = array () );
55+ public function critical (string | \ Stringable $ message , array $ context = [] );
5656
5757 /**
5858 * Runtime errors that do not require immediate action but should typically
5959 * be logged and monitored.
6060 *
61- * @param string $message
61+ * @param string|\Stringable $message
6262 * @param mixed[] $context
6363 *
6464 * @return void
6565 */
66- public function error ($ message , array $ context = array () );
66+ public function error (string | \ Stringable $ message , array $ context = [] );
6767
6868 /**
6969 * Exceptional occurrences that are not errors.
7070 *
7171 * Example: Use of deprecated APIs, poor use of an API, undesirable things
7272 * that are not necessarily wrong.
7373 *
74- * @param string $message
74+ * @param string|\Stringable $message
7575 * @param mixed[] $context
7676 *
7777 * @return void
7878 */
79- public function warning ($ message , array $ context = array () );
79+ public function warning (string | \ Stringable $ message , array $ context = [] );
8080
8181 /**
8282 * Normal but significant events.
8383 *
84- * @param string $message
84+ * @param string|\Stringable $message
8585 * @param mixed[] $context
8686 *
8787 * @return void
8888 */
89- public function notice ($ message , array $ context = array () );
89+ public function notice (string | \ Stringable $ message , array $ context = [] );
9090
9191 /**
9292 * Interesting events.
9393 *
9494 * Example: User logs in, SQL logs.
9595 *
96- * @param string $message
96+ * @param string|\Stringable $message
9797 * @param mixed[] $context
9898 *
9999 * @return void
100100 */
101- public function info ($ message , array $ context = array () );
101+ public function info (string | \ Stringable $ message , array $ context = [] );
102102
103103 /**
104104 * Detailed debug information.
105105 *
106- * @param string $message
106+ * @param string|\Stringable $message
107107 * @param mixed[] $context
108108 *
109109 * @return void
110110 */
111- public function debug ($ message , array $ context = array () );
111+ public function debug (string | \ Stringable $ message , array $ context = [] );
112112
113113 /**
114114 * Logs with an arbitrary level.
115115 *
116116 * @param mixed $level
117- * @param string $message
117+ * @param string|\Stringable $message
118118 * @param mixed[] $context
119119 *
120120 * @return void
121121 *
122122 * @throws \Psr\Log\InvalidArgumentException
123123 */
124- public function log ($ level , $ message , array $ context = array () );
124+ public function log ($ level , string | \ Stringable $ message , array $ context = [] );
125125}
0 commit comments