

list to csv with = in the list
I had a requirement to scan the logs and identify the specific keywords and then export that to a csv or to a database
I was able to achieve half of the solution. so far I was able to scan the logs with specific key word get that line and then in that line pick only necessary details and put it to a list
what I am unable to do is put this list into a desired format in csv
list is looking like below after half part of solution
['batchName=ColVal Batch', 'countOfOutboundXmlSent=183', 'countOfTradesPersistedInTdx=193', 'batchStartTime=2023-04-27T09:43:51.208Z]
desired output in csv

t1 = open(r"C:\Temp\tntrreporting.log", 'r')
fileone = t1.readlines()
text = "BatchTriggerDetails"
for line in fileone:
if text in (line):
details_index = line.find("batchName")
details_content = (line[details_index:len(line)-2])
details_1= details_content.split(",")
print (details_1)