1
我們的網絡應用程序使用CGI :: Application :: Plugin :: Session模塊存儲會話值以指示客戶端的位置。該值不是網址的一部分,我們不需要或不想爲每個位置使用虛擬主機。我想讓Apache將error_log實時分割爲單獨的「位置」日誌,而不是使用或創建後期處理解析器。我認爲要走的路要通過將日誌記錄傳輸到外部程序來處理拆分,使用下面的語法,但我不確定如何在運行時通過外部程序訪問會話位置值:
ErrorLog "|/usr/local/etc/apache24/some_program.pl"
這甚至有可能嗎?
你過濾上不會包含會話消息我需要的價值。它在會話本身不是標準輸入。此外,我不想添加數據到標準輸入流(如位置)。我只想知道是否有辦法訪問正在生成流的會話。 –
有關如何將會話ID添加到apache日誌,請參閱http://serverfault.com/questions/418110/how-to-log-session-id-into-apache-http-server-access-log。 您可以在apache記錄器中或處理請求的代碼中處理此操作(並省略日誌記錄消息)。 – xxfelixxx