httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ian Holsman <i...@apache.org>
Subject Re: modules/loggers
Date Tue, 04 Mar 2003 03:42:59 GMT
Philip M. Gollucci wrote:
> My bad, I was looking for 
> log_pfn_register 
> not
> APR_OPTIONAL_FN_TYPE
> APR_RETRIEVE_OPTIONAL_FN
> 
> Thanks again.
> On Monday 03 March 2003 19:00, Philip M. Gollucci wrote:
> 
>>While I'm thinking about it, this reallly seems like something a lot of
>>modules could want.  Are there any plans on abstracting this out of
>>mod_log_config to maybe an apr/apr-utll set of functions ? I might be
>>interested in doing it if there is interest.
> 
> 

hi Philip.

your nearly right.

log_pfn_register is for registering a new option for printing out the 
log line. (which I think is what mod_logio uses to add I/O bytes to the 
line).

I think you may be better off using the ap_log_writer/ap_log_writer_init 
hooks. These hooks allow you to change the logger from writing to a file 
to something your hook provides.

The only downside (in the 2.0 release) is that there is no way to 
specificy that some log files are to be written to disk, and some to 
your DB-logger. I have addressed this in the 2.1 release in a 
(hopefully) not kludgy way.

for an example on how to use it, check out how buffered logging is set 
up in mod_log_config.


--Ian


Mime
View raw message