Exception Handling In Python Logging