Getting PHP-FPM to talk to syslog on Ubuntu

Events happening in the community are now at Drupal community events on www.drupal.org.
Torenware's picture

I'm working on a couple of applications that will deploy on EC2, and we're having a hell of a time getting error output (calls to error_log(), php errors, etc.) sent to anything but a text error log.

Any ideas as to what the issue is here? Is this even possible right now with php5-fpm and nginx????

Here's what I've tried.

Going to a text log is easy enough if we put

error_log = /some/damn/path/error.log

into a pool configuration for php5-fpm on Ubuntu (11.10 at the moment).

So if I do

<?php
  error_log
('this will appear in a text log file using php-fpm');
?>

the error message will indeed appear in /some/damn/path/error.log.

But what I really need -- since we're doing EC2 autoscaling -- is to get the errors into rsyslog so we can send them on.

I've been googling this for a while, and I'm not sure that

error_log = syslog

works at all -- that is, at least on Ubuntu, it does not cause an error, but I have not been able to figure out what ident and facility any error will be assigned by syslog, and it is not appearing any files I can find. In particular: while some docs suggest that the "user" facility should get these php messages, as far as I can tell, they are just going into /dev/null.

Some of things I've been reading suggest that this is flat out broken in php-fpm right now. If it is, could someone please confirm this for me (and tell me if a fix is in progress). And if it is not: is there a work-around that does not require us to mirror error log files for each and every muthah-loving instance we are running?

I know that folks are using nginx in these kinds of deployments. I'm just curious how they debug these installs, if as it appears application errors are not readily dispatched to somewhere they can be found.

High performance

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

Hot content this week