The code below does not create a file anywhere on the system called ankilog.log
import logging
logging.basicConfig(filename='ankilog.log', level=logging.DEBUG)
logging.debug('This is a debug message')
logging.info('This is an info message')
logging.error('This is an error message')