save a log
Doru Georgescu <headset001-/[email protected]> Mon, 9 Aug 2010 02:22:08 -0700 (PDT)
| Newsgroups | gmane.comp.web.fastcgi.devel |
|---|---|
| Message-ID | <[email protected]> |
Please help me with another small but important issue: I want to log my fast cgi application's activity to a log file. I met two problems: 1. How to write to disk. I found FCGI_ToFile from fcgi_stdio.h on http://www.fastcgi.com/devkit/doc/fcgi-devel-kit.htm, and it did not work - the identifier is not defined. I found FCGI_ToFILE in fcgi_stdio.h, but it did no work - some conversion can not be performed. 2. How to write to /var/log/myapp.log. Only root can write to /var/log/ and to most /var/log/* files. I just disabled suexec for security reasons, following apache's site advice. Should I enable it just for the sake of logging? Should I write the log in my default cgi directory, /usr/lib/cgi-bin/? What security risks would be posed by each of these solutions? Because I am not using FCGI_Finish, I am now logging to apache's error log, which is a weird solution. What do you think is the best way to log from fast cgi? Thank you for your help, Doru