FPM: error_log entries all on same line
未关闭
@bukka 已经在做这个了。
开始于 2023年4月10日。
Feature
SAPI: fpm
- 主要语言
- C
- 星标
- 40.4k
- 派生
- 8.1k
- 平均合并
- 2 天 13 小时
- 30 天内合并 PR
- 96
描述
Description
The following code:
<?php
echo 'try err msg on line 1<p>';
error_log("err on line 1");
echo 'try err msg on line 2<p>';
error_log('err on line 2');
echo 'try err msg on line 3<p>';
error_log('err on line 3');
?>
Resulted in this output:
[Mon Mar 20 15:07:40.253904 2023] [proxy_fcgi:error] [pid 122391:tid 140026615572224] [client 129.71.34.33:53261] AH01071: Got error 'PHP message: err on line 1PHP message: err on line 2PHP message: err on line 3'
But I expected something similar to this instead:
[Mon Mar 20 13:25:38.221700 2023] [fcgid:warn] [pid 97183:tid 140026511869696] [client 129.71.34.33:57883] mod_fcgid: stderr: err on line 1
[Mon Mar 20 13:25:38.221753 2023] [fcgid:warn] [pid 97183:tid 140026511869696] [client 129.71.34.33:57883] mod_fcgid: stderr: err on line 2
[Mon Mar 20 13:25:38.221762 2023] [fcgid:warn] [pid 97183:tid 140026511869696] [client 129.71.34.33:57883] mod_fcgid: stderr: err on line 3
If I change back to FCGId I do get the above three individual log entries -- in fact my example above, as you can see, is from FCGId.
Either I am missing a setting in my PHP and/or FPM config (some flush or cache setting?) or FPM is the culprit here :-) If I send three different distinct error messages, each should be standalone and not concatenated together -- again FCGId logs things properly.
PHP Version
PHP 8.2.4
Operating System
No response
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
评估
这个 Issue 还没有评估数据。