From: Rony G. F. <Ron...@wu...> - 2011-04-29 12:49:00
|
Hi Jon, On 26.04.2011 23:24, Sahananda (Jon) Wolfers wrote: > I'm in favour of using log4rexx. I'm not sure what the telnet > appender is though. > > One rather nice thing that I do with my code is that my logging class > understands the sql class and on errors can interogate the sql object > directly, rollback &/or release the connection, so in cases of error I > can just write > > RETURN myLog~error(line 1 of errormessage, > ,line 2 of errormessage, > ,sql_object, > ,'Rollback Release Msg') > > and the log will interogate the sql object for details of the error, > log them, rollback the connection and release it, show the user an > error message and return -1. > When the log is closed it then emails details of the error to me. you could always extend the Log class with your own, overriding the log methods such that you can pass in your connection object and the like. Ad sending an e-mail: here you could create an own e-mail-appender, such that in the configuration you would add that e-mail-appender to those loggers (at the desired log level) that you think are necessary. Regards, ---rony |