httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Akins <brian.ak...@turner.com>
Subject Re: [PATCH] Re: Pluggable mod_log_config
Date Tue, 04 Oct 2005 12:37:08 GMT
Colm MacCarthaigh wrote:

> But in order to save overhead, this would require some intelligence, it
> would not make much sense for the pluggable logger to re-parse this
> string everytime, to figure out what it should be doing. And where does
> it get its database, username and host information from?  Do we require
> per-provider directives? Do we hack the format more to get them in
> somehow?


In this case, from my patches:

LogFormat "INSERT INTO foo VALUES ('%h', '%l');" foo-sql

CustomLog mysql://user:password@host/database foo-sql

and the mysql module would get the arrays of strings and lengths.  at 
init time, it would have prepared the format sql.  At log time, it would 
bind and execute.


> And after all of this, what if any, are the compelling reasons to
> implement this in httpd at all? Why can't all of this be moved into
> piped loggers? 


Try pipe loggers with 60 or so virtual hosts.  It doesn't scale well, as 
we open a pipe for each virtual that defines custom log.


Why can't they just parse the logs as they get them and
> do whatever whoever wants with it after that? After all, many people use
> "logger" to log to syslog. The whole mod_log_spread architecture with
> two netcat commands, and that can even be done with privilege
> seperation, which an in-httpd module never could.


What I did was something similar, although without pipes and not 
portably (at least not to windows).  I wrote a very simple log module 
that logs to Unix domain sockets:

CustomLog /logs/site.sock common

And the log "server" does whatever with it -- it's "pluggable."  I have 
a spread and an asynchronous disk one.

> On ftp.heanet.ie, we've been using piped loggers forever, our logs are
> damn busy, and we've seen our share of crashes, and these issues just
> never arise for us.

define "damn busy."  We may have a different scale of "busy."  I'v found 
pipe logs with lots of virtuals to be less than spectacular.  In Apache 
logging will be the best performance, but it lacks some flexibility. 
That's why I wrote my domain socket stuff.  However, I think the patches 
I've submitted allow for in-Apache logging to be very flexible with no 
additional overhead of pipes.

-- 
Brian Akins
Lead Systems Engineer
CNN Internet Technologies

Mime
View raw message