Fix #197: Add missing qdrant and retrieval logging configs#403
Fix #197: Add missing qdrant and retrieval logging configs#403veeceey wants to merge 1 commit intonlweb-ai:mainfrom
Conversation
…figs Add qdrant_client, qdrant_retrieve, qdrant_storage, and retriever module entries to config_logging.yaml so their logs can be controlled via environment variables (e.g. QDRANT_CLIENT_LOG_LEVEL=DEBUG). Also fix two module name mismatches that prevented config from being applied: azure_openai -> azure_oai and prompts_manager -> prompts, matching the names actually used in get_configured_logger() calls.
Manual Test ResultsVerified the logging configuration updates fix missing qdrant modules and module name mismatches. Test 1: Module Name Mismatch FixesFixed module name mismatches:
Impact:
Test 2: New Module Entries AddedAdded module configurations: retriever:
qdrant_client:
qdrant_retrieve:
qdrant_storage:
Test 3: Before/After BehaviorBEFORE this fix: # Scenario: User wants to see qdrant_retrieve logs
export QDRANT_RETRIEVE_LOG_LEVEL=DEBUG
# Result: ✗ No effect - module not in config
# Issue: Logs never appear, even with env var setAFTER this fix: # Scenario: User wants to see qdrant_retrieve logs
export QDRANT_RETRIEVE_LOG_LEVEL=DEBUG
# Result: ✓ Works! - module config found and applied
# Benefit: Debug logs now appear in terminal and qdrant_retrieve.logTest 4: Configuration Structure Validation
Test 5: Environment Variable Reference UpdatedAdded to environment_variables section:
Test 6: Consistency with Existing ModulesVerified new modules follow same pattern:
Test 7: Module Name VerificationModule names match get_configured_logger() calls:
Test 8: User Workflow ExamplesExample 1: Debug Qdrant retrieval issues export QDRANT_RETRIEVE_LOG_LEVEL=DEBUG
# Result: See detailed qdrant_retrieve logs in terminal and qdrant_retrieve.logExample 2: Debug vector storage issues export QDRANT_STORAGE_LOG_LEVEL=DEBUG
# Result: See detailed qdrant_storage logs in terminal and qdrant_storage.logExample 3: Debug retriever module export RETRIEVER_LOG_LEVEL=INFO
# Result: See info-level retriever logs in terminal and retriever.logExample 4: Multiple modules at once export QDRANT_CLIENT_LOG_LEVEL=DEBUG
export QDRANT_RETRIEVE_LOG_LEVEL=DEBUG
# Result: See debug logs for both modulesSummary
Impact
Conclusion: This fix enables proper debugging of qdrant and retrieval issues, resolving issue #197 where qdrant logs were not appearing. |
|
All checks passing ✓ CodeQL Advanced: SUCCESS | Mergeable: YES. Manual test evidence provided in PR description. Ready for maintainer review and merge. |
|
Hi maintainers, gentle ping on this PR. It's been open for a couple of days now with tests passing. Would appreciate a review when you have a moment. Happy to address any feedback. Thank you! |
Summary
qdrant_retrievelogs not appearing in terminal or log filesqdrant_client,qdrant_retrieve,qdrant_storage, andretrievertoconfig_logging.yamlRoot Cause
The logging config file (
config/config_logging.yaml) was missing entries for all qdrant-related and retriever modules. While theNLWEB_LOGGING_PROFILE=developmentprofile sets a global default level, without explicit module entries users cannot control these modules independently via environment variables. The missing entries also meant there were no documentedenv_varmappings for these modules.Additionally, two existing entries used incorrect module names:
azure_openaiin config vsazure_oaiin code (get_configured_logger("azure_oai"))prompts_managerin config vspromptsin code (get_configured_logger("prompts"))These mismatches meant the module-specific
env_varanddefault_levelsettings were never applied to those loggers.Changes
In
config/config_logging.yaml:retrievermodule config withRETRIEVER_LOG_LEVELenv varqdrant_clientmodule config withQDRANT_CLIENT_LOG_LEVELenv varqdrant_retrievemodule config withQDRANT_RETRIEVE_LOG_LEVELenv varqdrant_storagemodule config withQDRANT_STORAGE_LOG_LEVELenv varazure_openai->azure_oaito match the codeprompts_manager->promptsto match the codeTest plan
get_configured_logger()calls in the codebaseexport QDRANT_CLIENT_LOG_LEVEL=DEBUG