From: hno <> Date: Fri, 18 May 2007 01:55:52 +0000 (+0000) Subject: Author: Emilio Casbas X-Git-Tag: SQUID_3_0_PRE7~268 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=fef92cc14e0bd6b01bce4462699f875654c5560f;p=thirdparty%2Fsquid.git Author: Emilio Casbas logformat %rp logging the URL-Path only (excluding hostname) we need a "%ru" parameter like the httpd native log, that is showing; /SI/images/servicios/normasdeuso/normas.swf instead of http://X.X.X.60/SI/images/servicios/normasdeuso/normas.swf I have done a small patch to have a new "rp" format code in order to show only the urlpath in the access log. --- diff --git a/src/access_log.cc b/src/access_log.cc index 8402234f3d..1e486eafda 100644 --- a/src/access_log.cc +++ b/src/access_log.cc @@ -1,6 +1,6 @@ /* - * $Id: access_log.cc,v 1.122 2007/04/28 22:26:37 hno Exp $ + * $Id: access_log.cc,v 1.123 2007/05/17 19:55:52 hno Exp $ * * DEBUG: section 46 Access Log * AUTHOR: Duane Wessels @@ -364,6 +364,7 @@ typedef enum { LFT_REQUEST_METHOD, LFT_REQUEST_URI, + LFT_REQUEST_URLPATH, /*LFT_REQUEST_QUERY, * // * this is not needed. see strip_query_terms */ LFT_REQUEST_VERSION, @@ -482,6 +483,7 @@ struct logformat_token_table_entry logformat_token_table[] = {"rm", LFT_REQUEST_METHOD}, {"ru", LFT_REQUEST_URI}, /* doesn't include the query-string */ + {"rp", LFT_REQUEST_URLPATH}, /* doesn't include the host */ /* { "rq", LFT_REQUEST_QUERY }, * / / * the query-string, INCLUDING the leading ? */ {">v", LFT_REQUEST_VERSION}, {"rv", LFT_REQUEST_VERSION}, @@ -763,6 +765,13 @@ accessLogCustom(AccessLogEntry * al, customlog * log) break; + case LFT_REQUEST_URLPATH: + if (al->request) { + out = al->request->urlpath.buf(); + quote = 1; + } + break; + case LFT_REQUEST_VERSION: snprintf(tmp, sizeof(tmp), "%d.%d", (int) al->http.version.major, (int) al->http.version.minor); diff --git a/src/cf.data.pre b/src/cf.data.pre index 7393d0b413..c1a26fb442 100644 --- a/src/cf.data.pre +++ b/src/cf.data.pre @@ -1,6 +1,6 @@ # -# $Id: cf.data.pre,v 1.434 2007/05/13 21:27:50 hno Exp $ +# $Id: cf.data.pre,v 1.435 2007/05/17 19:55:52 hno Exp $ # # # SQUID Web Proxy Cache http://www.squid-cache.org/ @@ -1235,6 +1235,7 @@ DOC_START mt MIME content type rm Request method (GET/POST etc) ru Request URL + rp Request URL-Path excluding hostname rv Request protocol version et Tag returned by external acl ea Log string returned by external acl