Python Logging Traps