How to write text input to a filename.log file in streamlit. below is my function to create a log file but itβs not working . streamlit is not able to create the log file
def Log_Data(self,data,file_name):
yield self.env.timeout(0)
# Create and configure logger
logging.basicConfig(filename=file_name,format=β%(asctime)s %(message)sβ,filemode=βwβ)
# Creating an object
logger = logging.getLogger()
# Setting the threshold of logger to DEBUG
logger.setLevel(logging.DEBUG)
#logging the data
logger.info(data)