每当发生PHP错误或在Nginx / PHP-FPM服务器上的PHP中使用error_log()函数时,日志条目始终采用以下格式:
<TIMESTAMP> 506#0: *66699 FastCGI sent in stderr: "PHP message: <MESSAGE FROM PHP SCRIPT>" while reading response header from upstream, client: xx.xx.xx.xx, server: <SERVER>, request: "<HTTP CALL>", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host: "<HOST>", referrer: "<REFERRAL>"
有没有办法让这个更干净,以至于没有像Apache记录错误那样过多的文字?例如:
<TIMESTAMP>, <IP> <PHP MESSAGE>, <REFERRAL>