如何修改才能对stdout.log文件进行分割?
在config/server.php中设置的,代码如下:
return [
'event_loop' => '',
'stop_timeout' => 2,
'pid_file' => runtime_path() . '/webman.pid',
'status_file' => runtime_path() . '/webman.status',
'stdout_file' => runtime_path() . '/logs/stdout.log',
'log_file' => runtime_path() . '/logs/workerman.log',
'size' => 10 * 1024 * 1024
];
不能,worker只会再start/realod/restart时初始化路径,然后只管写入,直接用的fopen打开,file_put_content写入
好的,谢谢,那使用其它方式保存日志。
日志不是用logger么,这个只是框架相关的,一般业务日志不会也不应该写到这里
https://www.workerman.net/doc/webman/log.html