A Web Server Log Database, Part Two
A small amount of code produces a logger process to write web server log entries to a database.
Wednesday, February 15th, 2006
In last month’s “Perl of Wisdom” (available online at http://www.linux-mag.com/2006-01/perl_01, html), I showed how my Apache 2 processes use mod_perl2 to write logging information to a logger process. This month, let’s continue the discussion and look at the inner workings of the logger.
Connecting the Plumbing
The logger is launched with its stdin connected to a pipe created by the master Apache process. When the Apache master process spawns each of its child processes, the pipe is inherited by each child. Thus, each child can write information to the logger. (Conceptually, the plumbing looks something like Figure One.)