免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2817 | 回复: 3
打印 上一主题 下一主题

[proxy] 有谁知道customlog-2_5.patch这个文件应该怎么用 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2005-07-19 15:45 |只看该作者 |倒序浏览
今天刚下的squid-2.5.STABLE10,customlog-2_5.patch是个补丁文件,不过不知道怎么应用,请各位大侠告知

论坛徽章:
0
2 [报告]
发表于 2005-07-20 09:39 |只看该作者

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

自己搞定了,现在把方法发上来

首先进入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
这样就会自己寻找要打补丁的文件自动打上

论坛徽章:
0
3 [报告]
发表于 2005-07-28 15:46 |只看该作者

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

其实打补丁的时候提示输入文件名是因为没有自动找到要修补的文件
只需要将解压后的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一样的日志了

论坛徽章:
0
4 [报告]
发表于 2005-07-31 15:52 |只看该作者

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

这样的格式有什么样的好处?
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP