Commit ce383492 authored by Kirill Smelkov's avatar Kirill Smelkov

fixup! amari.xlog: Implement log rotation

Adjust plain writer to append to log file instead of truncating it on
the open. The rotating writers are already ok as they use "a" mode by default.
parent bf96c767
......@@ -494,7 +494,7 @@ def _openwriter(path: str, rotatespec) -> IWriter:
# _PlainWriter implements writer that emits data to plain file without rotation.
class _PlainWriter(IWriter):
def __init__(w, path):
w.f = open(path, "w")
w.f = open(path, "a")
def writeline(w, line: str):
w.f.write(line+'\n')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment