diff --git a/docs/conf.py b/docs/conf.py index e2746b8..29ac2a1 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -9,7 +9,7 @@ project = 'ObjLog' copyright = '2024, Kokonico' author = 'Kokonico' -release = '2.1.1' +release = '2.1.2' # -- General configuration --------------------------------------------------- # https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration diff --git a/objlog/Base/LogNode.py b/objlog/Base/LogNode.py index 6751f5d..d797394 100644 --- a/objlog/Base/LogNode.py +++ b/objlog/Base/LogNode.py @@ -45,8 +45,9 @@ def __init__(self, name: str, log_file: str | None = None, print_to_console: boo # chop the file lines = f.readlines() lines = lines[-max_log_messages:] - with self.open(log_file, "w") as f2: + with self.open(log_file, "w+") as f2: f2.writelines(lines) + self.log_len = len(lines) else: self.log_len = 0 diff --git a/pyproject.toml b/pyproject.toml index 19c857e..2792ca9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "ObjLog" -version = "2.1.1" +version = "2.1.2" description = "Logging, Objectified." authors = ["Kokonico "] readme = "README.md"