fix: Push a newline after all logs

This commit is contained in:
Aditya Hase 2020-02-24 16:15:29 +05:30
parent cb3507f5e4
commit 2b8c5a7f47

View file

@ -96,6 +96,7 @@ def flush():
logs = list(map(frappe.safe_decode, logs))
with open(log_file(), "a", os.O_NONBLOCK) as f:
f.write("\n".join(logs))
f.write("\n")
# Remove fetched entries from cache
frappe.cache().ltrim(MONITOR_REDIS_KEY, len(logs) - 1, -1)