Search squid archive

RE: Custom Log

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi.

Ive just implemented a simple modification to use the >st TOKEN in access_log.c. I have turned on
log_mime_hdrs so that this works.

My patch is as follows:  

Ive uncommented the line     LFT_REQUEST_SIZE_TOTAL,
and     { ">st", LFT_REQUEST_SIZE_TOTAL },

then added the following later on in the code 

        case LFT_REQUEST_SIZE_TOTAL:  
            outint = strlen(al->headers.request);
            doint = 1;
            break;

My squid.conf logformat line looks like this:
logformat common %>a %ui %un [%tl] "%rm %ru HTTP/%rv" %Hs %<st %Ss:%Sh %>st

The output I get howerver is this:
10.0.6.66 - - [22/Mar/2006:20:26:04 +0200] "GET
http://ly.lygo.com/ly/wired/news/images/thumb/bio-oil1_t.gif HTTP/1.0" 200 3228 TCP_MISS:DIRECT 231
10.0.6.66 - - [22/Mar/2006:20:26:05 +0200] "GET
http://ly.lygo.com/ly/wired/news/images/thumb/eliot2.gif HTTP/1.0" 200 4701 TCP_MISS:DIRECT 231
10.0.6.66 - - [22/Mar/2006:20:26:06 +0200] "GET
http://ly.lygo.com/ly/wired/news/images/thumb/forbescars1_t.gif HTTP/1.0" 200 4503 TCP_MISS:DIRECT
231
10.0.6.66 - - [22/Mar/2006:20:26:06 +0200] "GET
http://ly.lygo.com/ly/wired/news/images/thumb/tagcloud_t.gif HTTP/1.0" 200 4538 TCP_MISS:DIRECT 231
10.0.6.66 - - [22/Mar/2006:20:26:07 +0200] "GET
http://ly.lygo.com/ly/wired/shared/images/cs3/icon13sec_technology.gif HTTP/1.0" 200 592
TCP_MISS:DIRECT 231
10.0.6.66 - - [22/Mar/2006:20:26:07 +0200] "GET
http://ly.lygo.com/ly/wired/news/images/thumb/oldsounds1_t.gif HTTP/1.0" 200 4503 TCP_MISS:DIRECT
231
10.0.6.66 - - [22/Mar/2006:20:26:07 +0200] "GET http://ly.lygo.com/ly/wired/wired/covers/sm14_04.jpg
HTTP/1.0" 200 12144 TCP_MISS:DIRECT 231
10.0.6.66 - - [22/Mar/2006:20:26:08 +0200] "GET
http://ly.lygo.com/ly/wired/news/images/thumb/flysearch_t.gif HTTP/1.0" 200 4726 TCP_MISS:DIRECT 231
10.0.6.66 - - [22/Mar/2006:20:26:08 +0200] "GET
http://ly.lygo.com/ly/wired/shared/images/cs3/promo_Breaking_News_on.gif HTTP/1.0" 200 1018
TCP_MISS:DIRECT 231
10.0.6.66 - - [22/Mar/2006:20:26:08 +0200] "GET
http://ly.lygo.com/ly/wired/shared/images/cs3/tab_space.gif HTTP/1.0" 200 529 TCP_MISS:DIRECT 231


My question is this, the last value, 231 seems to repeat, the site i entered in the browser was
"www.wired.com". Is that for each of those images/pages/lines its still the original request of
"www.wired.com" so all the request_size_total remains the same?  Or is there something I have done
wrong and am not picking up?

Regards
/Cole

-----Original Message-----
From: Henrik Nordstrom [mailto:henrik@xxxxxxxxxxxxxxxxxxx] 
Sent: Monday, March 20, 2006 3:24 PM
To: cole@xxxxxxxxxxxx
Cc: 'Squid Users'
Subject: Re:  Custom Log

mån 2006-03-20 klockan 13:28 +0200 skrev Cole:

> Ive been looking at the custom log. And I see theres a token for LFT_REQUEST_SIZE_TOTAL.
> However, looking at the rest of the code, I see that it actually hasnt been coded, and its just
been
> set out for later development obviously.

Correct.

> I was wondering if anyone has actually done anything to get this token working yet or not? Or
> exactly where about I can get the actual data that this token would use. Or to get this token
> working.

The request body size is available as the Content-Length request header.
As this can be extracted using the existing request header tag no
shortcut tag has yet been implemented.

The request header size is available as the size of al->headers.request
if log_mime_hdrs is enabled, but for correctness it should be added as
an additional field in the request_t and filled in by the client side
routines while parsing the request... As the first is only available if
log_mime_hdrs is enabled it has not been considered a good approach for
implementation.

Regards
Henrik



[Index of Archives]     [Linux Audio Users]     [Samba]     [Big List of Linux Books]     [Linux USB]     [Yosemite News]

  Powered by Linux