diff --git a/scripts/logger/__init__.py b/scripts/logger/__init__.py
new file mode 100644
index 0000000..4f2140a
--- /dev/null
+++ b/scripts/logger/__init__.py
@@ -0,0 +1 @@
+from .logger import logger,set_logger_verbosity,quiesce_logger
\ No newline at end of file
diff --git a/scripts/logger.py b/scripts/logger/logger.py
similarity index 85%
rename from scripts/logger.py
rename to scripts/logger/logger.py
index 087a611..a448c54 100644
--- a/scripts/logger.py
+++ b/scripts/logger/logger.py
@@ -70,18 +70,16 @@ genfmt = "{level: <10} @ {time:YYYY-MM-DD HH:mm:ss}INIT | {extra[status]: <10} | {message}"
msgfmt = "{level: <10} | {message}"
-try:
- logger.level("GENERATION", no=24, color="")
- logger.level("PROMPT", no=23, color="")
- logger.level("INIT", no=31, color="")
- logger.level("INIT_OK", no=31, color="")
- logger.level("INIT_WARN", no=31, color="")
- logger.level("INIT_ERR", no=31, color="")
- # Messages contain important information without which this application might not be able to be used
- # As such, they have the highest priority
- logger.level("MESSAGE", no=61, color="")
-except TypeError:
- pass
+logger.level("GENERATION", no=24, color="")
+logger.level("PROMPT", no=23, color="")
+logger.level("INIT", no=31, color="")
+logger.level("INIT_OK", no=31, color="")
+logger.level("INIT_WARN", no=31, color="")
+logger.level("INIT_ERR", no=31, color="")
+# Messages contain important information without which this application might not be able to be used
+# As such, they have the highest priority
+logger.level("MESSAGE", no=61, color="")
+
logger.__class__.generation = partialmethod(logger.__class__.log, "GENERATION")
logger.__class__.prompt = partialmethod(logger.__class__.log, "PROMPT")
@@ -100,3 +98,5 @@ config = {
],
}
logger.configure(**config)
+
+logger.add("logs/log_{time:MM-DD-YYYY!UTC}.log", rotation="8 MB", compression="zip", level='INFO') # Once the file is too old, it's rotated