How does Worker::$stdoutFile in workerman generate new log files by date every day?

God, I want to print the data in the events file. The manual says to print the data with Worker::$stdoutFile, so I use the date as the file name, as follows: Worker::$stdoutFile = "/ home/tmp/" .date ("YmurmMudd"). ".log"; But I found that instead of generating a new log file every day, there was only one print file generated on the first day, and the print data for the next few days were also written in it. Why? Is there any way to generate new log files every day to record print data?
will there be any impact on gatewayworker performance if the data is printed all the time? At present, the amount of data printed is still relatively large, and there are probably dozens of Mb in a day

.
Php
Sep.17,2021

Worker::$stdoutFile = "/ home/tmp/" .date ('YmurmMurd`). ".log"; however, it is found that there is not a new log file generated every day, but only a print file generated on the first day, and the print data of the next few days are also written in it. Why?

because workerman runs in memory, for example, 20181025.log is obtained after the first run, and the date () will not be read later

is there any way to generate new log files every day to record print data?

find the code in which workeman generates the log and modify it. You can find it yourself. Don't help

suggestion: distinguish between workerman log and business log, don't mix them up


you can clean the log regularly

Menu