logging - 如何将 PHP 错误写入 stderr?

标签 logging stdout php stderr

如何更改 php-fpm.conf(或 php.ini),以便将所有错误/警告/...写入标准错误(或替代标准输出)?

我跑 php5-fpmdaemonize = no并希望在我的终端中查看所有错误。

最佳答案

解决方法是设置...

; Redirect worker stdout and stderr into main error log. If not set, stdout and
; stderr will be redirected to /dev/null according to FastCGI specs.
; Note: on highloaded environement, this can cause some delay in the page
; process time (several ms).
; Default Value: no
catch_workers_output = yes

关于logging - 如何将 PHP 错误写入 stderr?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24599821/

相关文章:

ajax - 如何记录 JSF ajax 请求的方法表达式

c - 将 stdout/stderr 重定向到 C 中的函数

node.js - 您如何在Go中获得“实时”控制台输出?

php - GoDaddy SMTP() 失败控制面板

php - 基本 PHP SQL - 从 URL 查询多个内容

ruby-on-rails - Rails 不记录请求

hibernate - Grails “stuck”始终记录所有SQL查询

php - 如何使用 ZF2 获取数组中的结果

Python 标准日志记录

python - 将标准输出重定向到 tkinter 文本小部件