feat(logger): set diagnose=False to prevent exposing secrets in Loguru traceback logs#26814
Open
aoright wants to merge 1 commit into
Open
feat(logger): set diagnose=False to prevent exposing secrets in Loguru traceback logs#26814aoright wants to merge 1 commit into
aoright wants to merge 1 commit into
Conversation
…u traceback logs Signed-off-by: 辰言 <oncwnuIWp30GguOyJ615Fqj8H-yc@git.weixin.qq.com>
sanmaxdev
reviewed
Jul 6, 2026
sanmaxdev
left a comment
There was a problem hiding this comment.
Looks good. Loguru enables diagnose by default, and this patch disables it on all three start_logger sinks: JSON/stdout plus audit file output.
Checked the diff against backend/open_webui/utils/logger.py and confirmed it applies cleanly.
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
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.
Pull Request Checklist
devbranch.feat:prefix.Changelog Entry
Description
Loguru traceback logs evaluate and print local variable values (by default
diagnose=True), which can easily leak sensitive information (such as API keys, Bearer tokens, DB connections, or passwords) into standard stdout/JSON logs when exceptions occur in production environments.This PR sets
diagnose=Falseon the configured Loguru stdout, JSON, and audit log file sinks, preventing local variable evaluation while retaining the clean formatted traceback.Fixed
diagnose=Falseon stdout, JSON, and audit log file sinks inlogger.py.Contributor License Agreement