Workerman

God, I want to print the data in the events file, the manual says to use Worker::$stdoutFile to print the data, so I used the date composition name, Worker::$stdoutFile = "/ home/tmp/" .date ("YmurmMurdd"). ".log"; but 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 there, may I ask why? Is there any way to update new files every day to record print data?
will there be any impact on gatewayworker performance if the data is printed all the time? And the amount of data printed is still relatively large, about dozens of Mb in a day

.
Php
Sep.16,2021

Worker::$stdoutFile is a global property, and the execution status is in the startup process. So the generated timestamp is the timestamp at startup. If you need to write a log, you need to implement the log segmentation logic on your own. You can also use third-party log classes such as seaslog.

Menu