Based on my (limited) understanding of the `logging` module, I think you should `import logging` at the top of the file instead of doing this assignment.