liuhanzhao 回復于:2005-07-20 09:39:10 |
自己搞定了,現在把方法發上來
首先進入squid的文件夾 #cd squid-2.5.STABLE10 #patch -p0 < ../customlog-2_5.patch 之后會出現如下顯示 can't find file to patch at input line 9 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |This patch is generated from the customlog-2_5 branch of s2_5 in squid |Tue Apr 5 10:14:00 2005 GMT |See http://devel.squid-cache.org/ | |Index: squid/src/access_log.c |diff -u squid/src/access_log.c:1.15.6.6 squid/src/access_log.c:1.15.6.3.2.12 |--- squid/src/access_log.c:1.15.6.6 Mon Sep 27 19:14:07 2004 |+++ squid/src/access_log.c Wed Sep 29 14:33:10 2004 -------------------------- File to patch: 在File to patch: 后輸入access_log.c所在路徑,如/root/squid-2.5.STABLE10/src/access_log.c 然后回車確定,下同 上面這種方式是人工操作,下面這種方式是自動打補丁 patch -p1 < ../customlog-2_5.patch 這樣就會自己尋找要打補丁的文件自動打上 |
roadli 回復于:2005-07-28 15:46:49 |
其實打補丁的時候提示輸入文件名是因為沒有自動找到要修補的文件
只需要將解壓后的squid-2.5.STABLE10目錄名改成squid 然后cd squid patch -p1 < ../customlog-2_5.patch 就可以自動打上補丁了 使用的話,在squid.conf文件中加上 strip_query_terms off logformat combined %>a %ui %un [%tl] "%rm %ru HTTP/%rv" %Hs %<st "%{Referer}>h" "%{User-Agent}>h" access_log /var/squid/logs/access.log combined 這樣就能夠輸出和apache的combined格式的log一樣的日志了 |
ljily000 回復于:2005-07-31 15:52:22 |
這樣的格式有什么樣的好處? |