Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: debug logs in server #1452

Merged

Conversation

norton120
Copy link
Contributor

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.

@sarahwooders sarahwooders self-requested a review June 15, 2024 01:18
@norton120 norton120 changed the title Hotfix/debug logs in server fix/debug logs in server Jun 15, 2024
@norton120 norton120 changed the title fix/debug logs in server fix: debug logs in server Jun 15, 2024
@sarahwooders sarahwooders changed the base branch from main to logger-staging June 15, 2024 22:51
@sarahwooders sarahwooders merged commit 5c3cb4b into cpacker:logger-staging Jun 15, 2024
9 of 12 checks passed
cpacker pushed a commit that referenced this pull request Jun 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

2 participants