write logfile line by line

This commit is contained in:
avollkopf 2024-05-01 19:55:29 +02:00
parent d7ff5ca712
commit 00ac853488

View file

@ -157,15 +157,14 @@ class SystemController:
j.seek_realtime(since)
for entry in j:
result.append(entry['MESSAGE'])
logging.error(result)
try:
with open(fullname, 'w') as f:
f.write(result)
for line in result:
f.write(f"{line}\n")
except Exception as e:
logging.error(e)
plugins = await self.plugins_list()
with open(fullpluginname, 'w') as f:
f.write(plugins)