I am trying to use logging in my small python project. Following the tutorial, I added the code below to my code, but the message wan\'t logged to the file as it was supposed to
You called basicConfig() twice at least; the first time without a filename. Clear the handlers and try again:
basicConfig()
logging.getLogger('').handlers = [] logging.basicConfig( filename = "a.log", filemode="w", level = logging.DEBUG)