-
-
Notifications
You must be signed in to change notification settings - Fork 646
Universal HTTP logging #1254
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
Open
gastonmorixe
wants to merge
6
commits into
simonw:main
Choose a base branch
from
gastonmorixe:gm/feature/logging
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Universal HTTP logging #1254
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
f4b6bd7
to
85db9b6
Compare
- CLI: add --http-logging and --http-debug flags (env: LLM_HTTP_LOGGING, LLM_HTTP_DEBUG) and early initialization via configure_http_logging(). - utils: implement universal HTTP logging (color formatter, config detection, logging setup); include 'format' in _get_http_logging_config for tests; support NO_COLOR. - Tests: add unit and integration tests for HTTP logging configuration and CLI help. - Ignore build/ and dist/ in .gitignore; remove stray build/ artifact. - Add docs page docs/http-debugging.md with Quick Start, env vars, CLI flags and guidance; link from docs/logging.md and include in main TOC. - Regenerate docs/help.md and README to include new flags and navigation.
85db9b6
to
a0e6126
Compare
The user-facing documentation for the new universal HTTP logging feature was split across `UNIVERSAL-HTTP-LOGGING.md` and `docs/http-debugging.md`. This commit consolidates all the relevant user-facing documentation into `docs/http-debugging.md` and removes the now redundant `UNIVERSAL-HTTP-LOGGING.md` file, which contained mostly implementation details.
@codex review please and give your thoughts / suggestions |
@codex can you review please? |
The loop that attaches handlers only runs when logger.handlers is empty. The OpenAI SDK (and some others) ship their loggers with a logging.NullHandler pre‑attached, so this condition is false and your code never replaces the NullHandler. As a result, even after --http-logging the OpenAI logger still drops all messages and nothing is emitted. To make the feature actually show provider logs, the setup should detect and replace existing NullHandlers (or always add your stream handler) instead of skipping loggers that already have a handler. Co-authored-by: chatgpt-codex-connector[bot] <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Important
Disclaimer: I vibe-coded this logging feature with codex-cli and claude code. I'm not a python expert at all. This should be carefully reviewed.
--http-logging
and--http-debug
flags (env:LLM_HTTP_LOGGING
,LLM_HTTP_DEBUG
) and early initialization via configure_http_logging()._get_http_logging_config
for tests; supportNO_COLOR
.