mirror of
https://github.com/open-webui/open-webui.git
synced 2026-10-23 05:33:48 +00:00
feat(logger): set diagnose=False to prevent exposing secrets in Loguru traceback logs
Signed-off-by: 辰言 <oncwnuIWp30GguOyJ615Fqj8H-yc@git.weixin.qq.com>
This commit is contained in:
parent
10724d057a
commit
e2a96c0822
1 changed files with 3 additions and 0 deletions
|
|
@ -178,6 +178,7 @@ def start_logger():
|
|||
_json_sink,
|
||||
level=GLOBAL_LOG_LEVEL,
|
||||
filter=audit_filter,
|
||||
diagnose=False,
|
||||
)
|
||||
else:
|
||||
logger.add(
|
||||
|
|
@ -185,6 +186,7 @@ def start_logger():
|
|||
level=GLOBAL_LOG_LEVEL,
|
||||
format=stdout_format,
|
||||
filter=audit_filter,
|
||||
diagnose=False,
|
||||
)
|
||||
if AUDIT_LOG_LEVEL != 'NONE' and ENABLE_AUDIT_LOGS_FILE:
|
||||
try:
|
||||
|
|
@ -195,6 +197,7 @@ def start_logger():
|
|||
compression='zip',
|
||||
format=file_format,
|
||||
filter=lambda record: record['extra'].get('auditable') is True,
|
||||
diagnose=False,
|
||||
)
|
||||
except Exception as e:
|
||||
logger.error(f'Failed to initialize audit log file handler: {str(e)}')
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue