[Trent] > 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!") I don't like this. I think it rare you will want to log an exception with no contextual message. Eg, info(sys.exc_info()) Would be pretty useless in a log. You would also want to include *what* went wrong (whereas the exception generally only tells you *why* (and where) it went wrong. Mark.
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