Okay. I have completed my first python program.It has around 1000 lines of code.
During development I placed plenty of print statements before running a command
Just a note about append vs write mode. Change filemode to "w" if you would like it to replace log file. I also had to comment out the stream. Then using logging.info() was outputting to file specified.
if __name__ == '__main__':
LOG_FORMAT = '%(asctime)s:%(levelname)s ==> %(message)s'
logging.basicConfig(
level=logging.INFO,
filename="logfile",
filemode="w",
format=LOG_FORMAT
#stream=sys.stdout
)