有谁知道customlog25.patch这个文件应该怎么用Windows系统 -电脑资料

电脑资料 时间:2019-01-01 我要投稿
【www.unjs.com - 电脑资料】

    今天刚下的squid-2.5.STABLE10,customlog-2_5.patch是个补丁文件,不过不知道怎么应用,请各位大侠告知 liuhanzhao 回复于:2005-07-20 09:39:10 自己搞定了,现在把方法发上来 首先进入squid的文件夹 #cdsquid-2.5.STABLE10 #patch-p0../customlog-2_5.pat

    今天刚下的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 thiswas:

    --------------------------

    |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 %h" "%{User-Agent}>h"

    access_log /var/squid/logs/access.log combined

    这样就能够输出和apache的combined格式的log一样的日志了

    ljily000 回复于:2005-07-31 15:52:22这样的格式有什么样的好处?

   

    原文转自:http://www.ltesting.net

最新文章