Article delegate-en/2206 of [1-5169] on the server localhost:119
  upper oldest olders older1 this newer1 newers latest
search
[Top/Up] [oldest] - [Older+chunk] - [Newer+chunk] - [newest + Check]
[Reference:<_A2205@delegate-en.ML_>]
Newsgroups: mail-lists.delegate-en

[DeleGate-En] Re: How can I not log some objects of specific extension?
07 Apr 2003 20:37:45 GMT feedback@delegate.org (Yutaka Sato)


On 04/08/03(02:55) you <pqyeabdyi-t7hpjilpbwxr.ml@ml.delegate.org> wrote
in <_A2205@delegate-en.ML_>
 |> Are you sure that you have applied the patch?
 |
 |Yes, the executable was compiled with the patch! I've checked with
 |strings on the binary and it's been modified.
 |
 |But, after looking more deeper in the detail log file, I think that it
 |was doing something!
 |It seem to do fine for 2XX HTTP status (no error) for images. But I see
 |something in the LOG when transfering images with 304 HTTP status.
 |
 |Here's an example of LOG:
 |Client001.out.ca - - [07/Apr/2003:13:53:45 --500] "GET
 |http://serveur001.in.ca/images/new/index/txt/g1.jpg HTTP/1.0" 304 0
 |3*0.038+0.003:W:0+1
 |
 |If I understand correctly, it's in the log not because of the CMAP
 |configuration, but because it's somekind of non-normal HTTP status (304
 |is not supposed to be an error) !?!

The response code 304 is a very usual one which indicates that the
original data is not modified since the client cached it at previous
access.  Thus it has no data body, and omits meta-information like
Content-Type. 

Now I generalized NOLOGTYPE to NOLOG like the enclosed patch.
With it, you can specify the type of response by response code or
content type like this:.

  CMAP="302,304,image/*,video/*:NOLOG:*:*:*"

Cheers,
Yutaka
--
  @ @ Yutaka Sato <y.sato@delegate.org> http://www.delegate.org/y.sato/
 ( - ) National Institute of Advanced Industrial Science and Technology (AIST)
_<   >_ 1-1-4 Umezono, Tsukuba, Ibaraki, 305-8568 Japan
Do the more with the less -- B. Fuller


*** ../dist/delegate8.5.2/src/httplog.c	Wed Jan  8 22:15:33 2003
--- httplog.c	Tue Apr  8 05:09:07 2003
***************
*** 65,70 ****
--- 65,76 ----
  	char buff[8*1024],*fmt,*fp,fc,fmtb[256],tmp[256];
  	char cstat;
  
+ 	if( 0 <= find_CMAP(Conn,"NOLOG",buff) ){
+ 		sprintf(arg,"%d/%s",rcode,ctype);
+ 		if( strmatch_list(arg,buff,"",NULL,NULL) )
+ 			return;
+ 	}
+ 
  	if( (log = HTTPLOG) == NULL )
  		return;
  /*

  admin search upper oldest olders older1 this newer1 newers latest
[Top/Up] [oldest] - [Older+chunk] - [Newer+chunk] - [newest + Check]
@_@V