httpd-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 25014] New: - A flexible interface for mod_log_config
Date Wed, 26 Nov 2003 13:42:49 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=25014>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=25014

A flexible interface for mod_log_config

           Summary: A flexible interface for mod_log_config
           Product: Apache httpd-2.0
           Version: 2.0.48
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Enhancement
          Priority: Other
         Component: mod_log_config
        AssignedTo: bugs@httpd.apache.org
        ReportedBy: st@kino-fahrplan.de


The current mod_log_config has a very limited capability for support of log
writers other than the build-in file/pipe writer. This is a bit bad since some
people would like to log somewhere else (usually some kind of database), all
data or only parts thereof, as an exclusive log target or in addition to the
standard files.
Currently, there can be only one writer and it has to deal with whatever string
mod_log_config assembles for him. The other possibility would be to bypass
mod_log_config completely and thus reinventing the wheel. In any case, a number
of configuration directives have to be added, all doing more or less the same
two things: specifying a target and a format.

This variant of mod_log_config allows an unlimited number of external log
writers to be added. The log writers can be used simultanously, their basic
configuration is done through mod_log_config's CustomLog and LogFormat
directives and they have full control over the data they get (i.e. is it a
string, a number, a date or is it not applicable to the current request).

A number of people have been using this mod_log_config with my mod_log_mysql
without problems for a while now. Configuration for mod_log_mysql looks like this:

  LogFormat "insert into %{mysqlname}v set host=%h, time=%t, [..]" mysql_format
  CustomLog mysql:mysqluser!mysqlpassword@mysqlhost/databasename mysql_format

That's it, quite straight forward. No extra directives needed, the log format is
an SQL command, the %-parameters are handled by mod_log_config (and thus are
always the same and still support externals like mod_logio and mod_ssl), the log
target looks basically like a familiar URI.

This mod_log_config itself implements two log writers, file: and pipe:, which
work like mod_log_config always did.

The module is 100% backwards compatible, it works both with old external
%-parameters (as said, e.g. mod_logio and mod_ssl) and with old external log
writers.


-----------


In addition to that, this mod_log_config allows to conditionally log accesses
not only on environment variables but also on return status codes. This was
until now only possible for single items but not for the complete line. Didn't
make much sense to me since that might dump a thousand empty lines in my logs if
I'm only interested in e.g. bad referrers resulting in a 404. It's better to
skip these lines completely and only log if there actually is a 404.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


Mime
View raw message