This commit is contained in:
2023-07-31 23:09:00 +08:00
parent c062a8f6a3
commit 0fbb08ed58
7 changed files with 94 additions and 422 deletions
+4 -3
View File
@@ -21,14 +21,15 @@ class StdoutLogger extends Logger
* @param string $model
* @return bool
*/
public function addError($message, string $model = 'app'): bool
public function failure($message, string $model = 'app'): bool
{
if ($message instanceof \Exception) {
$this->errors[$model] = $message->getMessage();
} else {
$this->errors[$model] = $message;
}
return false;
}
$this->error($model, [$message]);
return false;
}