我有一个通过快速 cgi 运行的催化剂应用程序,而 apache 错误日志毫无用处。
例子:
[Thu Oct 13 08:44:35 2011] [error] [client {IP}] FastCGI: server "/usr/local/www/handprints2/script/handprints2_fastcgi.pl" stderr: | -> handprints2::View::json->process | 0.000523s |, referer: https://[SERVER]/handprints2/
[Thu Oct 13 08:44:35 2011] [error] [client {IP}] FastCGI: server "/usr/local/www/handprints2/script/handprints2_fastcgi.pl" stderr: | /end | 0.000324s |, referer: https://[SERVER]handprints2/
[Thu Oct 13 08:44:35 2011] [error] [client {IP}] FastCGI: server "/usr/local/www/handprints2/script/handprints2_fastcgi.pl" stderr: '------------------------------------------------------------+-----------', referer: https://[SERVER]/handprints2/
有办法解决这个问题吗?
最佳答案
您可以使用 TransferLog
和 LogFormat
指令在 apache 中配置您自己的日志提要和格式:
TransferLog /tmp/sample.log
LogFormat "bazinga -> %U"
参见 Apache 2.0 Logging Directives或 Apache 1.3 Logging Directives
关于Perl Catalyst 和 FastCgi 错误记录问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7758156/