I haven't found any established way to write a line to the log file only if
certain conditions are met. For example, I'd like to have an authentication
log that is written to only for pages that required authentication. I was
hoping to be able to use the 'notes' feature in my authentication module to do
this, but that doesn't seem like it's going to work.
With mod_log_config, I could have a log file that would include a lot of empty
('-') lines, but I don't see a way to have no line written for unprotected
pages. I could definitely hack out something that would work for just this
case, but I think I'm going to need this functionality quite often.
I think I'm going to start with mod_log_config and add a 'required' attribute
to the condition flags, and change process_item() to handle this case. Maybe I
can return a NULL instead of a "-" from process_item() if the item is required
but not present, and then change config_log_transaction() to log nothing if
this happens? But that's stuff for later tonight.
But if any one has ideas or suggestions of better approaches, I'd love to hear
them.
Thanks!
http://www.tripod.com