Instead of developing something new, how about extending the combined/common log format?
That what I'm doing in my place, where we have to store a few extra bits of info so to make the log more useful for debugging, I added a little routine in my startup.pl, to setup a few additional env variable, which I linked the routine to mod_perl via the PostRequestHandler. By adjusting the combinded format to store these env vars, I build the log format that address my need. Tor. Marcin Kasperski wrote: > > I am to provide some custom logging in my mod_perl > application. Omitting some unnecessary details, I need to store some > information after processing each request, putting this info into some > central log (be it file or database) common for all apache processes > and (if possible) common for multiple machines. > > I would like to ask for any suggestions/hints/patterns/... but there > are also some specific qustions: > > 1) Apache somehow gathers notes from multiple processes into single > access.log and error.log. Is it possible to reuse this functionality > somehow for writing my custom information somewhere else? Considering > such functionality is already present I would not like to reimplement > logic protecting from simultaneous write from multiple processess... > > 2) Looking at the name, seems it is LogHandler where custom logging > should take place. But does it really give real advantage over just > logging on the end of PerlHandler? If so, how should I pass data > between handlers - just stick to some perl global variable or use > pnotes? > > 3) Are there any tools of 'gather logs from multiple machines to the > central location' you would recommend? > > -- > ( Marcin Kasperski | Communication takes place between people, documents ) > ( http://www.mk.w.pl | are secondary. (Booch) ) > (----------------------------------------------------------------------------) > ( Nie gub zgÝÕsze??bÞÐd?¢çä: http://www.mk.w.pl/narzedzia/narzedzia_bugewid )