Hi I want my python script to print minute wise log so I want variable b to be replaced but its not happening and log file generating with name %(b)s_python.log
Please Help !
import logging, datetime
a=datetime.date.today()
b=a.strftime("%y_%B_%a_%H%M")
print(b)
logging.basicConfig(filename="D:\%(b)s_python.log",level=logging.DEBUG,format="%(levelname)s %(asctime)s-%(message)s")
logging.debug("Hi Sudhirrrrrrrrr")
filename="D:\{0}_python.log".format(b),level=logging.DEBUG,format="{0} {1}-{2}".format(levelname, asctime, message)?