cpacker / MemGPT

Letta (fka MemGPT) is a framework for creating stateful LLM services.
https://letta.com
Apache License 2.0
11.85k stars 1.29k forks source link

fix: debug logs in server #1452

Closed norton120 closed 3 months ago

norton120 commented 3 months ago

Please describe the purpose of this pull request. This exposes log messages from the MemGPT logger (and children) in the server log stream. By default INFO + will be displayed, set MEMGPT_DEBUG to add debug logs to the stream too.

MEMGPT_DEBUG false or not set Screenshot from 2024-06-14 20-28-56 MEMGPT_DEBUG true Screenshot from 2024-06-14 20-27-55

How to test

  1. Fire up the server with MEMGPT_DEBUG either set or not set
  2. See the logs!

Have you tested this PR?

Is your PR over 500 lines of code? This is turning out to be an excellent gateway for the config work we've discussed. I am going to piggyback a second PR off this one that will marry the rest of the constants into the settings singleton next, which was started in this PR with the MEMGPT_DIR envar.

Additional context We will want a milder logging config for non-development eventually, but since this is on par with how logging was set up already and there are bigger fish to fry, I just named it DEVELOPMENT_LOGGING to remind us that we need a prod version.

I removed the logging tests because they were basically testing Python logging, which is Python's job not ours 😉

There was a log that printed the auth key/password - I didn't want to leave that in there so I updated.