浏览代码

Fix upcoming method conflict (#294)

* Fix upcoming method conflict

* Fix CS
Mark Scherer 1 年之前
父节点
当前提交
d1f1f0d01f
共有 1 个文件被更改,包括 11 次插入6 次删除
  1. 11 6
      src/Error/ErrorLogger.php

+ 11 - 6
src/Error/ErrorLogger.php

@@ -16,13 +16,18 @@ class ErrorLogger extends CoreErrorLogger {
 	 *
 	 * @param \Throwable $exception The exception to log a message for.
 	 * @param \Psr\Http\Message\ServerRequestInterface|null $request The current request if available.
+	 * @param bool $includeTrace Should the log message include a stacktrace.
 	 *
-	 * @return bool
+	 * @return void
 	 */
-	public function log(Throwable $exception, ?ServerRequestInterface $request = null): bool {
+	public function logException(
+		Throwable $exception,
+		?ServerRequestInterface $request = null,
+		bool $includeTrace = false,
+	): void {
 		foreach ($this->getConfig('skipLog') as $class) {
 			if ($exception instanceof $class) {
-				return false;
+				return;
 			}
 		}
 
@@ -36,12 +41,12 @@ class ErrorLogger extends CoreErrorLogger {
 
 			$message .= "\n\n";
 
-			return Log::write($level, $message, ['404']);
+			Log::write($level, $message, ['404']);
+
+			return;
 		}
 
 		parent::logException($exception, $request);
-
-		return true;
 	}
 
 }