Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
open-webui
Commits
8dc73fdb
Commit
8dc73fdb
authored
Jul 17, 2024
by
Timothy J. Baek
Browse files
enh: remove /health logging
parent
8ec3ed18
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
backend/config.py
backend/config.py
+10
-0
No files found.
backend/config.py
View file @
8dc73fdb
...
@@ -77,6 +77,16 @@ for source in log_sources:
...
@@ -77,6 +77,16 @@ for source in log_sources:
log
.
setLevel
(
SRC_LOG_LEVELS
[
"CONFIG"
])
log
.
setLevel
(
SRC_LOG_LEVELS
[
"CONFIG"
])
class
EndpointFilter
(
logging
.
Filter
):
def
filter
(
self
,
record
:
logging
.
LogRecord
)
->
bool
:
return
record
.
getMessage
().
find
(
"/health"
)
==
-
1
# Filter out /endpoint
logging
.
getLogger
(
"uvicorn.access"
).
addFilter
(
EndpointFilter
())
WEBUI_NAME
=
os
.
environ
.
get
(
"WEBUI_NAME"
,
"Open WebUI"
)
WEBUI_NAME
=
os
.
environ
.
get
(
"WEBUI_NAME"
,
"Open WebUI"
)
if
WEBUI_NAME
!=
"Open WebUI"
:
if
WEBUI_NAME
!=
"Open WebUI"
:
WEBUI_NAME
+=
" (Open WebUI)"
WEBUI_NAME
+=
" (Open WebUI)"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment