mirror of
https://github.com/PiBrewing/craftbeerpi4.git
synced 2024-12-03 12:14:18 +01:00
write logfile line by line
This commit is contained in:
parent
d7ff5ca712
commit
00ac853488
1 changed files with 2 additions and 3 deletions
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in a new issue