mirror of
https://github.com/open-webui/open-webui.git
synced 2026-07-16 06:03:26 -05:00
[PR #15640] [MERGED] refactor(logger): Conditionally include extra_json in logs #62754
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/15640
Author: @ipapapa
Created: 7/11/2025
Status: ✅ Merged
Merged: 8/4/2025
Merged by: @tjbck
Base:
dev← Head:feat/cleaner-logs📝 Commits (1)
54d606erefactor(logger): Conditionally include extra_json in logs📊 Changes
1 file changed (+6 additions, -2 deletions)
View changed files
📝
backend/open_webui/utils/logger.py(+6 -2)📄 Description
Pull Request Checklist
Discussion Post
https://github.com/open-webui/open-webui/discussions/15641
Before submitting, make sure you've checked the following:
devbranch.Changelog Entry
Description
Refactored the logging utility to make log output cleaner and more efficient by only including the
extra_jsonfield when there is actual extra data to display. This avoids cluttering logs with empty JSON objects.Added
Changed
backend/open_webui/utils/logger.py: Modifiedstdout_formatto conditionally addextra_json.Deprecated
Removed
Fixed
Security
Breaking Changes
Additional Information
clean and efficient code.
Related commit:
54d606eabScreenshots or Videos
Contributor License Agreement
By submitting this pull request, I confirm that I have read and fully agree to the Contributor License Agreement (CLA), and I am providing my contributions under its terms.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.