logging.basicConfig(level=logging.INFO,filename=r"path\Logs.txt",format='%(asctime)s %(message)s',filemode='a')
Its printing in the console instead of writing to a file.
I am expecting it to be written to a log file.
logging.basicConfig(level=logging.INFO,filename=r"path\Logs.txt",format='%(asctime)s %(message)s',filemode='a')
Its printing in the console instead of writing to a file.
I am expecting it to be written to a log file.
If you are trying to write debug log after setting log level to info, it will not be written. Try writing info and warning logs. As below:
logging.info("Info Log")
logging.warn("Warning Log")
logging.debug("Debug Log") #It will not be written in your log file