[Vinay Sajip wrote] > > ZEO is a component that lets clients on remote machines > > access a ZODB storage using a custon Python RMI. (The > > details aren't exactly important, except that it's a > > concrete example.) > Point taken. In my current implementation, there is a generalized logging > method in class Logger: > > def log(self, level, msg, *args): > > I propose to add an additional method: > > def logException(self, level, exc_info, msg, *args) No need to pass in the exc_info if you are already specifying that an exception is being logged via log*Exception*. How about this (just an idea): def info(self, msgOrException, *args): if isinstance(msgOrException, Exception): # format the exception and msg, args = args[0], args[1:] else: # treat it like before try: # ... except Exception, ex: log.info(ex, "Eeeeek!") Trent -- Trent Mick TrentM@ActiveState.com
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4