mod_log_mysql 20031023 review

Download
by rbytes.net on

mod_log_mysql can log requests to Apache 2 using a MySQL database. Here are some key features of "mod log mysql": · Seamless inte

License: The Apache License
File size: 22K
Developer: Sonke Tesch
0 stars award from rbytes.net

mod_log_mysql can log requests to Apache 2 using a MySQL database.

Here are some key features of "mod log mysql":
Seamless integration into the standard Apache logging configuration.
Only one configuration line needed to start logging.
Free SQL use.
Multiple databases, database users and/or database servers.
Connection pooling, only one connection per log target per child process.
Logs data as it is: e.g. times as SQL DATETIME and n/a items as SQL NULL.
Won't loose data if the database server is down.

Configuration:

There is only one configuration directive and on a stable system, you do not even need it. Cool, isn't it?

LogMySQLFallback [fallback dir] [fallback retry timeout]

In case the connection to the database server is down, mod_log_mysql can write the SQL commands into files, one per log target.

LogMySQLFallback sets the directory in which these files will be created. The second argument - if given - sets the time between two connection retries in seconds. The default is 30 seconds, i. e. mod_log_mysql will only try to reconnect every 30 seconds.

mod_log_mysql will leave a message in the server's ErrorLog whenever the connection fails and when the connection comes back. The module will not automatically send the data it wrote into the fallback files to the database if the connection is up again. This might change in future releases, but for now you can simply parse the files with the mysql command line tool:

mysql -p -D httpd < /var/log/apache2/bitbrook_de

As mentioned above, mod_log_mysql uses one file per log target. The format is simply the log URI given to CustomLog or TransferLog with any unsafe characters replaced by an underscore.

Requirements:
The modular mod_log_config
A fixed Apache Portable Runtime
Apache webserver 2.0.46 or better

mod_log_mysql 20031023 search tags