有谁知道customlog-2_5.patch这个文件应该怎么用

王朝厨房·作者佚名  2007-01-02
窄屏简体版  字體: |||超大  

今天刚下的squid-2.5.STABLE10,customlog-2_5.patch是个补丁文件,不过不知道怎么应用,请各位大侠告知

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

这样的格式有什么样的好处?

 
 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
 
 
© 2005- 王朝網路 版權所有 導航