Catch fastcgi stderr

13 views
Skip to first unread message

Florian Bureau

unread,
Aug 18, 2017, 6:13:01 AM8/18/17
to openresty-en
Hi,

We are running openresty for few month now in production with custom lua script providing auth / aes encoding / logging / etc for our api write in php through fastcgi,

I'm wondering if there is a way to get the following line existing in error.log :
"
2017/08/11 17:16:40 [error] 31658#0: *1219974 FastCGI sent in stderr: "PHP message: PHP Warning:  Invalid argument supplied for foreach() in /var/www/apnl-v4/v4/core/lib/controller/WSController.php on line 278" while reading response header from upstream, client: 10.1.10.1, server: , request: "GET /nothing?token=fzen3Qf&forward_url=https://www.google.com/ HTTP/1.1", upstream: "fastcgi://127.0.0.1:9001", host: "apnl.ws"
"

We use log_by_lua to send log to our backend in redis/node/websocket to display in a backoffice the api call in realtime and it will be great if we can add to our log this info,

I'm not sure because i think it's directly fastcgi module who write this but maybe someboy here as an idea !

Thanks,

Regards,



Reply all
Reply to author
Forward
0 new messages