mirror of
https://github.com/rommapp/romm.git
synced 2026-06-27 22:35:57 +00:00
changes from bot review
This commit is contained in:
@@ -46,6 +46,11 @@ LOGGING_CONFIG = {
|
||||
"handlers": ["default"],
|
||||
"propagate": False,
|
||||
},
|
||||
"uvicorn.access": {
|
||||
"level": LOGLEVEL,
|
||||
"handlers": ["default"],
|
||||
"propagate": False,
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ keys=gunicorn_format
|
||||
level=WARNING
|
||||
handlers=
|
||||
|
||||
# Gunicorn internal logger
|
||||
# Gunicorn internal logger (overridden at runtime)
|
||||
[logger_gunicorn]
|
||||
level=INFO
|
||||
handlers=console_gunicorn
|
||||
|
||||
@@ -40,8 +40,10 @@ export ROMM_BASE_PATH=${ROMM_BASE_PATH:-/romm}
|
||||
export ROMM_PORT=${ROMM_PORT:-8080}
|
||||
|
||||
# Disable nginx access logs when log level is WARNING, ERROR, or CRITICAL
|
||||
case "${LOGLEVEL:-INFO}" in
|
||||
WARNING | ERROR | CRITICAL | warning | error | critical)
|
||||
loglevel="${LOGLEVEL:-INFO}"
|
||||
loglevel="${loglevel^^}"
|
||||
case "${loglevel}" in
|
||||
WARNING | WARN | ERROR | CRITICAL)
|
||||
export NGINX_ACCESS_LOG="access_log off;"
|
||||
;;
|
||||
*)
|
||||
|
||||
@@ -93,6 +93,10 @@ start_bin_gunicorn() {
|
||||
# cleanup potentially leftover socket
|
||||
rm /tmp/gunicorn.sock -f
|
||||
|
||||
# Wire LOGLEVEL into Gunicorn's logging config so it respects the env var
|
||||
local gunicorn_level="${LOGLEVEL^^}"
|
||||
sed -i '/\[logger_gunicorn\]/,/^\[/ s/^level=.*/level='"${gunicorn_level}"'/' /etc/gunicorn/logging.conf
|
||||
|
||||
# commands to start our main application and store its PID to check for crashes
|
||||
info_log "Starting backend"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user