How to Solve NameError: name 'DEBUG' is not defined -- logging

Solution: Import the 'DEBUG' module

# Add the following line to the top of your code
from logging import DEBUG

 

For more information:
logging DEBUG