A unique id: requestid
is generated after receiving a request; this id is recorded as a prefix when logging later. Later, by locating the problem, you can easily get all the logs of this request through requestid
.
in fpm
run mode, you can save requestid
through global variables or global objects.
under swoole
, the form of global variables is overridden by subsequent requests because the mode that supports asynchronous protocols is supported.
do you have any good plans?
it is found that the fd
of each request is unique. Apart from the callback function, I wonder if there is a way to get $fd
?