Platform for stateful agents: AI with advanced memory that can learn and self-improve over time.
[cpacker#319] fixed error with config with improper include in config.py added test_log.py. for testing global logging in log.py
Max Blackmerabf4fb03bdbe
diff --git a/memgpt/config.py b/memgpt/config.pyindex 5d61c72ea..ced041bf6 100644--- a/memgpt/config.py+++ b/memgpt/config.py@@ -1,4 +1,4 @@-from log import logger+from memgpt.log import loggerimport inspectimport jsonimport osdiff --git a/tests/test_log.py b/tests/test_log.pynew file mode 100644index 000000000..5beb45305--- /dev/null+++ b/tests/test_log.py@@ -0,0 +1,16 @@+import logging+from memgpt.log import logger+from memgpt.constants import LOGGER_LOG_LEVELS+import pytest+++def test_log_debug():+ # test setting logging level+ assert logging.DEBUG == LOGGER_LOG_LEVELS["DEBUG"]+ logger.setLevel(LOGGER_LOG_LEVELS["DEBUG"])+ assert logger.isEnabledFor(logging.DEBUG)++ # Assert that the message was logged+ assert logger.hasHandlers()+ logger.debug("This is a Debug message")+ assert 1 == 1