Apache 1.2: Is conditional logging possible?

Apache 1.2: Is conditional logging possible?

Post by Nathan J. Kur » Sat, 18 Jan 1997 04:00:00



I haven't found any established way to write a line to the log file only if
certain conditions are met.  For example, I'd like to have an authentication
log that is written to only for pages that required authentication. I was
hoping to be able to use the 'notes' feature in my authentication module to do
this, but that doesn't seem like it's going to work.  

With mod_log_config, I could have a log file that would include a lot of empty
('-') lines, but I don't see a way to have no line written for unprotected
pages. I could definitely hack out something that would work for just this
case, but I think I'm going to need this functionality quite often.

I think I'm going to start with mod_log_config and add a 'required' attribute
to the condition flags, and change process_item() to handle this case.  Maybe I
can return a NULL instead of a "-" from process_item() if the item is required
but not present, and then change config_log_transaction() to log nothing if
this happens?  But that's stuff for later tonight.

But if any one has ideas or suggestions of better approaches, I'd love to hear
them.

Thanks!


http://www.tripod.com

 
 
 

1. Apache 1.2 and HTTP/1.0 in its access log?

We have been running Apache 1.2 release for a while by now.  I just
got a chance to review the access log generated on one of our servers.

To my surprise, I see the following:

202.76.103.2 - - [19/Jun/1997:15:49:58 -0700] "GET /sharetm.htm HTTP/1.0" ....
                                                   ^^^^^^^^^^^^^^^^^^^^^
I saw all these HTTP/1.0 entries!  Surprised, I fired up Netscape 4 and hit
the server myself.  Samething.  This is not right, Apache 1.2 and Netscape
4 both should support HTTP/1.1.  I also checked httpd.h in the src
subdirectory, and the HTTP header IS defined as HTTP/1.1.

I am quite puzzled.  Anyone has a hint?

Thanks,

Chin Fang

2. xterm: Error 23, errno 22: invalid argument

3. Adding a string to a log entry in Apache 1.2

4. Compaq Concerto and X

5. ?? Apache 1.2 and browser logging

6. ifconfig RX, TX packet errors

7. ANNOUNCE: Log rotation patches for Apache 1.2

8. Bourbon Street supports Linux!

9. Logging Use of Internet with Apache 1.2 Proxy Enabled

10. Conditional logging in Apache and regular expressions

11. Apache: mod_servlet for Apache 1.2?

12. upgrade from apache 1.1.3 to apache 1.2 fails

13. A possible XFree86-3.1.2 Bug?