Работает error_log()
Только его перехватывает и выводит в консоль nginx а у него нет возможности без хаков и плагинов настроить форматирование ошибок. В результате в консоли не особо читаемое
2017/12/02 07:06:58 [error] 8#8: *63 FastCGI sent in stderr: "PHP message: asd" while reading response header from upstream, client: 172.18.0.14, server: , request: "POST /track/272823569 HTTP/1.0", upstream: "fastcgi://127.0.0.1:9000", host: "localdev"
2017/12/02 07:06:59 [error] 8#8: *65 FastCGI sent in stderr: "PHP message: asd" while reading response header from upstream, client: 172.18.0.14, server: , request: "POST /track/272823569 HTTP/1.0", upstream: "fastcgi://127.0.0.1:9000", host: "localdev"
2017/12/02 07:07:00 [error] 8#8: *67 FastCGI sent in stderr: "PHP message: asd" while reading response header from upstream, client: 172.18.0.14, server: , request: "POST /track/272823569 HTTP/1.0", upstream: "fastcgi://127.0.0.1:9000", host: "localdev"