[FASTCGI] save a log

Daniel Lo wilburlo at gmail.com
Tue Aug 10 19:55:01 EDT 2010


You can log to various services directly such as syslog or syslog-ng.
You can also create your own directory in /var/log/my_app, and then
change ownership of my_app to nobody:nobody.

-daniel


On Mon, Aug 9, 2010 at 2:22 AM, Doru Georgescu <headset001 at yahoo.com> wrote:
> 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
>
>
>
>
>
> _______________________________________________
> FastCGI-developers mailing list
> FastCGI-developers at mailman.fastcgi.com
> http://mailman.pins.net/mailman/listinfo.cgi/fastcgi-developers
>



-- 
We must make the world honest before we can honestly say to our
children that honesty is the best policy.  -Bernard Shaw


More information about the FastCGI-developers mailing list