import threading
def log_periodically(t, message):
''' Writes to the user-defined log every t seconds.
Need to import the threading module '''
t = threading.Timer(float(t), log_periodically, args=[t, message])
t.daemon = True
t.start()
logging.info(message)