This isn’t logger-specific behaviour. Never mutate (insert/remove elements) the list you’re currently iterating on. If you need, make a copy. In this case testLogger.handlers.clear()
should do the trick.
This isn’t logger-specific behaviour. Never mutate (insert/remove elements) the list you’re currently iterating on. If you need, make a copy. In this case testLogger.handlers.clear()
should do the trick.