Add logging for avatar processing

This commit is contained in:
Visman 2023-05-15 18:45:52 +07:00
parent a8d3f59abd
commit 4f27a39ace
2 changed files with 16 additions and 0 deletions

View file

@ -139,6 +139,12 @@ class Edit extends Profile
if (true === $result) {
$this->curUser->avatar = $v->upload_avatar->name() . '.' . $v->upload_avatar->ext();
} else {
$this->c->Log->warning('Profile Failed image processing', [
'user' => $this->user->fLog(),
'curUser' => $this->curUser->fLog(),
'error' => $v->upload_avatar->error(),
]);
}
}

View file

@ -135,7 +135,17 @@ class RegLog extends Page
if (true === $result) {
$user->avatar = $image->name() . '.' . $image->ext();
} else {
$this->c->Log->warning('OAuth Failed image processing', [
'user' => $user->fLog(),
'error' => $image->error(),
]);
}
} else {
$this->c->Log->warning('OAuth Avatar not image', [
'user' => $user->fLog(),
'error' => $this->c->Files->error(),
]);
}
}