2011-06-23 66 views

回答

4

客戶端解決方案:如果您使用的是Firefox,則插件螢火蟲(https://addons.mozilla.org/de/firefox/addon/firebug/)可以執行此操作。

Serverside集團解決方案:您可以指定在Apache日誌格式如下(供您訪問日誌):

%...B:   Bytes sent, excluding HTTP headers. 
%...b:   Bytes sent, excluding HTTP headers. In CLF format 

的 「...」 可什麼都沒有(如, 「%或者它可以指示 包含項目 的條件(如果條件不滿足,將導致它被替換爲 以「 - 」)。

參見:http://httpd.apache.org/docs/1.3/mod/mod_log_config.html

增加: 你會發現在你的httpd.conf是這樣的:

LogFormat "%h %l %u %t \"%r\" %>s %b" common 
CustomLog logs/access_log common 

這是很容易定製。

+0

看來,沒有辦法使用自定義日誌格式來記錄收到的字節。 – Leif