Python logging utils.