This commit is contained in:
2023-04-16 02:46:54 +08:00
parent d22955233c
commit 0bf69d576d
4 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -541,7 +541,7 @@ abstract class Model extends Component implements ModelInterface, ArrayAccess, T
}
$validate = $this->resolve($rule);
if (!$validate->validation()) {
return $this->logger->addError($validate->getError(), 'mysql');
return \Kiri::getLogger()->addError($validate->getError(), 'mysql');
} else {
return TRUE;
}
+1 -1
View File
@@ -210,7 +210,7 @@ class Command extends Component
private function error(\Throwable $throwable): bool
{
$message = $this->sql . '.' . json_encode($this->params, JSON_UNESCAPED_UNICODE);
return $this->logger->addError($message . $throwable->getMessage(), 'mysql');
return \Kiri::getLogger()->addError($message . $throwable->getMessage(), 'mysql');
}
+2 -2
View File
@@ -149,7 +149,7 @@ class Pagination extends Component
try {
call_user_func($this->_callback, $data, $param);
} catch (\Throwable $exception) {
$this->logger->addError($exception, 'throwable');
\Kiri::getLogger()->addError($exception, 'throwable');
} finally {
$data = null;
}
@@ -179,7 +179,7 @@ class Pagination extends Component
try {
call_user_func($this->_callback, $data, $param);
} catch (\Throwable $exception) {
$this->logger->addError($exception, 'throwable');
\Kiri::getLogger()->addError($exception, 'throwable');
}
}
+1 -1
View File
@@ -91,7 +91,7 @@ class SqlBuilder extends Component
private function __updateBuilder(array $string): string|bool
{
if (empty($string)) {
return $this->logger->addError('None data update.');
return \Kiri::getLogger()->addError('None data update.');
}
return 'UPDATE ' . $this->query->from . ' SET ' . implode(',', $string) . $this->_prefix();