By implementing the necessary methods for LogWriter, it can support the Context Manager syntax:
writer = LogWriter.with_datetime(folder="./", threshold=10)
# Do stuff
writer.flush()
would become
with LogWriter.with_datetime(folder="./", threshold=10) as writer:
# Do stuff