lundi 3 octobre 2016

Python test script timestamp with changing number

Hi so I am trying to make a test script that will display a timestamp everytime the script is run. How do I make it so the "test " will show a different number for the number of times run. So like Test 1, Test 2, Test 3, ext. Also is there an easy way to have this run lets say 10 times or do I just make a new script for that? #Logging

LOG_FILENAME = "Power.log"
logging.basicConfig(filename=LOG_FILENAME,level=logging.DEBUG, format='%(asctime)s %(message)s', datefmt='%m/%d/%Y %I:%M:%S %p')
logging.warning('Test ')

Aucun commentaire:

Enregistrer un commentaire