This commit is contained in:
2025-12-18 15:39:47 +08:00
parent 377a9c17c3
commit f6f94aff32
4 changed files with 9 additions and 9 deletions
+2 -2
View File
@@ -89,7 +89,7 @@ class Kiri
if (Kiri::getPlatform()->isMac()) { if (Kiri::getPlatform()->isMac()) {
return; return;
} }
$name = '[' . \config('id', 'system-service') . ']'; $name = '[' . \config('site.id', 'system-service') . ']';
if (!empty($prefix)) { if (!empty($prefix)) {
$name .= '.' . $prefix; $name .= '.' . $prefix;
} }
@@ -104,7 +104,7 @@ class Kiri
public static function getStoragePath(): string public static function getStoragePath(): string
{ {
$default = APP_PATH . 'storage' . DIRECTORY_SEPARATOR; $default = APP_PATH . 'storage' . DIRECTORY_SEPARATOR;
$path = \config('storage', $default); $path = \config('site.log.path', $default);
if (!is_dir($path)) { if (!is_dir($path)) {
mkdir($path, 0777, true); mkdir($path, 0777, true);
} }
+1 -1
View File
@@ -769,7 +769,7 @@ if (!function_exists('process_name_set')) {
return; return;
} }
$name = \config('id', 'system') . '[' . $pid . ']'; $name = \config('site.id', 'system') . '[' . $pid . ']';
if (!empty($prefix)) { if (!empty($prefix)) {
$name .= '.' . $prefix; $name .= '.' . $prefix;
} }
+5 -5
View File
@@ -54,10 +54,10 @@ class Application extends BaseApplication
*/ */
public function init(): void public function init(): void
{ {
$this->errorHandler->registerShutdownHandler(config('error.shutdown', [])); $this->errorHandler->registerShutdownHandler(config('site.error.shutdown', []));
$this->errorHandler->registerExceptionHandler(config('error.exception', [])); $this->errorHandler->registerExceptionHandler(config('site.error.exception', []));
$this->errorHandler->registerErrorHandler(config('error.error', [])); $this->errorHandler->registerErrorHandler(config('site.error.error', []));
$this->id = config('id', uniqid('id.')); $this->id = config('site.id', uniqid('id.'));
$this->provider->on(OnBeforeCommandExecute::class, [$this, 'beforeCommandExecute']); $this->provider->on(OnBeforeCommandExecute::class, [$this, 'beforeCommandExecute']);
} }
@@ -73,7 +73,7 @@ class Application extends BaseApplication
if (!($beforeCommandExecute->command instanceof ServerCommand)) { if (!($beforeCommandExecute->command instanceof ServerCommand)) {
$scanner = $this->container->get(Scanner::class); $scanner = $this->container->get(Scanner::class);
$scanner->load_directory(APP_PATH . 'app/'); $scanner->load_directory(APP_PATH . 'app/');
} else if (config('reload.hot', false) === false) { } else if (config('site.reload.hot', false) === false) {
$scanner = $this->container->get(Scanner::class); $scanner = $this->container->get(Scanner::class);
$scanner->load_directory(APP_PATH . 'app/'); $scanner->load_directory(APP_PATH . 'app/');
} }
+1 -1
View File
@@ -48,7 +48,7 @@ class StdoutLogger extends Component
{ {
parent::__construct(); parent::__construct();
$this->logger = new Logger(\config('id')); $this->logger = new Logger(\config('site.id'));
$this->levels = [ $this->levels = [
'debug' => $this->logger::DEBUG, 'debug' => $this->logger::DEBUG,
'info' => $this->logger::INFO, 'info' => $this->logger::INFO,