2011-10-13 49 views
3

我有一個催化劑應用程序運行通過快速CGI和Apache錯誤日誌是無用的。Perl催化劑和FastCgi錯誤記錄問題

例子:

[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/ 

是有辦法解決這一問題?

+2

不知道爲什麼我爲此得到-1。我爲這個問題添加了更多的日誌條目。我知道這是催化劑用戶常見的問題,但我無法找到一個好的答案。 – shaneburgess

回答

2

我有同樣的問題,並沒有真正找到了Apache日誌配置路由方便。

這確實工作得很好,但:https://metacpan.org/pod/Catalyst::Plugin::Log::Handler

說明從CPAN:

如果你的Catalyst項目記錄很多信息,通過標準 錯誤記錄到Apache的錯誤日誌是不是很乾淨:日誌消息是 與其他Web應用程序的噪聲混合;尤其是如果您使用 mod_fastcgi,則每行都會前綴一個長前綴。

另一種方法是登錄到文件。但是,那麼你必須確保多個進程不會損壞日誌文件 。模塊 由Jonny Schulz編寫的Log :: Handler完成此操作,因爲它支持 消息式植絨。

該模塊是所述Log :: Handler的包裝。