From 7e05cf4e214e91e84030309f931d7150144c03e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mikael=20Schir=C3=A9n?= Date: Thu, 13 Nov 2025 22:48:00 +0100 Subject: [PATCH] make path to audit log configurable (#19173) --- backend/open_webui/env.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/backend/open_webui/env.py b/backend/open_webui/env.py index b85316d955..f2fff5cfdf 100644 --- a/backend/open_webui/env.py +++ b/backend/open_webui/env.py @@ -721,7 +721,9 @@ if OFFLINE_MODE: # AUDIT LOGGING #################################### # Where to store log file -AUDIT_LOGS_FILE_PATH = f"{DATA_DIR}/audit.log" +# Defaults to the DATA_DIR/audit.log. To set AUDIT_LOGS_FILE_PATH you need to +# provide the whole path, like: /app/audit.log +AUDIT_LOGS_FILE_PATH = os.getenv("AUDIT_LOGS_FILE_PATH", f"{DATA_DIR}/audit.log") # Maximum size of a file before rotating into a new log file AUDIT_LOG_FILE_ROTATION_SIZE = os.getenv("AUDIT_LOG_FILE_ROTATION_SIZE", "10MB")