Graham Dumpleton wrote:
Anyway, I have attached an updated version of my log handler. This fixes
the issue with log levels that don't exactly map to any defined level.
Eliminates the explicit stack for storing request objects and in general
tries to make the module durable in the face of any module reloading
scheme for mod_python which exists now or which may exist in the future.

You can either use the default "mod_python" log it sets up, or create
explicit instances of ApacheLogHandler and add them against any log
within the hierarchy that you want.

Any feedback most welcome.

Seems kind of overly complicated to me. If this was something to be integrated into the mod_python core, I think it should probably be implemented at a lower level, perhaps even set up by the dispatcher before the first handler is dispatched and cleaned up at the end automatically. That is, only if you have enabled some sort of mod_python directive in the apache.conf file. As it is now it still seems sort of hack-ish.

Additionally, if this is to fully interface with apache's log_error function, then the other severities should be added as logging levels, which is possible with logger.

Nick

Reply via email to