Revert "改名"

This reverts commit fdf58326
This commit is contained in:
2022-01-07 14:38:36 +08:00
parent f867f4be9e
commit c9726e5778
3 changed files with 27 additions and 80 deletions
+14 -2
View File
@@ -9,11 +9,11 @@ declare(strict_types=1);
namespace Kiri\Error;
use Note\Inject;
use Exception;
use Kiri\Abstracts\Component;
use Kiri\Core\Json;
use Kiri\Kiri;
use Note\Inject;
use Psr\Log\LoggerInterface;
use Throwable;
@@ -46,9 +46,21 @@ class Logger extends Component
*/
public function getLastError(string $application = 'app'): string
{
return 'Unknown error.';
return $this->logs[$application] ?? 'Unknown error.';
}
/**
* @param $message
* @param $method
* @return void
*/
public function fail($message, $method)
{
$this->logs[$method] = $message;
}
/**
* @param string $messages
* @param string $method