單例模式導(dǎo)致
if ($timezone = config('app.default_timezone')) {
date_default_timezone_set($timezone);
}
執(zhí)行晚于
\support\Log::channel('default')
$this->timezone = $timezone ?: new DateTimeZone(date_default_timezone_get() ?: 'UTC');
<?php
//process.php
'task' => [
'handler' => \Webman\App::class,
'listen' => 'http://0.0.0.0:8686',
'count' => 8, // 進(jìn)程數(shù)
'user' => '',
'group' => '',
'reusePort' => true,
'constructor' => [
'requestClass' => \support\Request::class, // request類設(shè)置
'logger' => \support\Log::channel('default'), // 日志實(shí)例
'appPath' => app_path(), // app目錄位置
'publicPath' => public_path() // public目錄位置
]
]
應(yīng)該是 2024-10-23 21:xx:xx
[2024-10-23 13:50:59] default.INFO: hello [] []
[2024-10-23 13:54:30] default.INFO: hello [] []