Comment Comment by teddyh > LOG005 use exception() within an exception handlerIn Python, exception handling is part of the normal control flow. Therefore, when an exception happens, it is not always the case that you want to log a full stack trace. try: thing = things[0] except IndexError: log.error("Not enough things!") return I think that even recommending a log.exception() here would actually be a bad thing. parent teddyh 3 years ago
In Python, exception handling is part of the normal control flow. Therefore, when an exception happens, it is not always the case that you want to log a full stack trace.
I think that even recommending a log.exception() here would actually be a bad thing.