From: John O. <jo...@ve...> - 2006-09-27 17:25:33
|
Robert Jacobson wrote: >I've implemented a buffering mechanism in my wrapper's log() >call. Basically I check using {dbh}->ping() if the database is >up. If not, I buffer the message in an array and return success so >that the parent program can proceed. > >When the database comes back up I dump the buffer to the DBI appender. > > I can't help with the timestamp issue but I'd recommend having a maximum buffer size too, after which you stop saving up the messages - it could be used on a system where the DB might be down for days in the event of a disaster. Maybe if you're feeling very clever, revert to a file appender if the DB is down! cheers John |