Skip to content

Commit

Permalink
add: Env var SE_SUPERVISORD_LOG_LEVEL to set supervisord log level (#…
Browse files Browse the repository at this point in the history
…2317)

Signed-off-by: Viet Nguyen Duc <nguyenducviet4496@gmail.com>
  • Loading branch information
VietND96 authored Jul 21, 2024
1 parent fffb8da commit 582fb2c
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 4 deletions.
3 changes: 2 additions & 1 deletion Base/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ ENV SE_BIND_HOST=false \
# Boolean value, maps "--reject-unsupported-caps"
SE_REJECT_UNSUPPORTED_CAPS=false \
SE_OTEL_JAVA_GLOBAL_AUTOCONFIGURE_ENABLED=true \
SE_OTEL_TRACES_EXPORTER="otlp"
SE_OTEL_TRACES_EXPORTER="otlp" \
SE_SUPERVISORD_LOG_LEVEL="info"

CMD ["/opt/bin/entry_point.sh"]
4 changes: 3 additions & 1 deletion Base/supervisord.conf
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ childlogdir=/var/log/supervisor ; ('AUTO' child log dir, default $
logfile=/var/log/supervisor/supervisord.log ; (main log file;default $CWD/supervisord.log)
logfile_maxbytes=50MB ; (max main logfile bytes b4 rotation;default 50MB)
logfile_backups=10 ; (num of main logfile rotation backups;default 10)
loglevel=info ; (log level;default info; others: debug,warn,trace)
loglevel=%(ENV_SE_SUPERVISORD_LOG_LEVEL)s ; (log level;default info; others: debug,warn,trace) http://supervisord.org/logging.html
pidfile=/var/run/supervisor/supervisord.pid ; (supervisord pidfile;default supervisord.pid)
nodaemon=true ; (start in foreground if true;default false)
minfds=1024 ; (min. avail startup file descriptors;default 1024)
Expand All @@ -14,6 +14,8 @@ minprocs=200 ; (min. avail process descriptors;
[unix_http_server]
file=/tmp/supervisor.sock ; (the path to the socket file)
chmod=0700
username=%(ENV_SEL_USER)s
password=secret

; the below section must remain in the config file for RPC
; (supervisorctl/web interface) to work, additional interfaces may be
Expand Down
3 changes: 2 additions & 1 deletion Video/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ ENV DISPLAY_NUM=99 \
SE_PRESET="-preset ultrafast" \
VIDEO_FOLDER=${VIDEO_FOLDER} \
SE_VIDEO_FILE_NAME=video.mp4 \
SE_VIDEO_FILE_NAME_TRIM_REGEX="[:alnum:]-_"
SE_VIDEO_FILE_NAME_TRIM_REGEX="[:alnum:]-_" \
SE_SUPERVISORD_LOG_LEVEL="info"

EXPOSE 9000
2 changes: 1 addition & 1 deletion Video/supervisord.conf
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ childlogdir=/var/log/supervisor ; ('AUTO' child log dir, default $
logfile=/var/log/supervisor/supervisord.log ; (main log file;default $CWD/supervisord.log)
logfile_maxbytes=50MB ; (max main logfile bytes b4 rotation;default 50MB)
logfile_backups=10 ; (num of main logfile rotation backups;default 10)
loglevel=info ; (log level;default info; others: debug,warn,trace)
loglevel=%(ENV_SE_SUPERVISORD_LOG_LEVEL)s ; (log level;default info; others: debug,warn,trace) http://supervisord.org/logging.html
pidfile=/var/run/supervisor/supervisord.pid ; (supervisord pidfile;default supervisord.pid)
nodaemon=true ; (start in foreground if true;default false)
minfds=1024 ; (min. avail startup file descriptors;default 1024)
Expand Down
2 changes: 2 additions & 0 deletions charts/selenium-grid/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,8 @@ serverConfigMap:
# nameOverride:
env:
SE_JAVA_OPTS: "-XX:+UseZGC"
# Log level of supervisord. Accept values: critical, error, warn, info, debug, trace, blather (http://supervisord.org/logging.html)
SE_SUPERVISORD_LOG_LEVEL: "info"
# Custom annotations for configmap
annotations: {}

Expand Down
4 changes: 4 additions & 0 deletions tests/charts/ci/base-auth-ingress-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ global:
logLevel: INFO
stdoutProbeLog: true

serverConfigMap:
env:
SE_SUPERVISORD_LOG_LEVEL: "error"

ingress:
className: nginx
hostname: ""
Expand Down
4 changes: 4 additions & 0 deletions tests/docker-compose-v3-test-parallel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ services:
- SE_BROWSER_ARGS_DISABLE_DSHM=--disable-dev-shm-usage
- SE_BROWSER_ARGS_INCOGNITO=--incognito --incognito
- SE_LOG_LEVEL=${LOG_LEVEL}
- SE_SUPERVISORD_LOG_LEVEL=error

firefox:
profiles:
Expand All @@ -43,6 +44,7 @@ services:
- SE_EVENT_BUS_SUBSCRIBE_PORT=4443
- SE_NODE_ENABLE_MANAGED_DOWNLOADS=true
- SE_LOG_LEVEL=${LOG_LEVEL}
- SE_SUPERVISORD_LOG_LEVEL=error

edge:
profiles:
Expand All @@ -62,6 +64,7 @@ services:
- SE_EVENT_BUS_SUBSCRIBE_PORT=4443
- SE_NODE_ENABLE_MANAGED_DOWNLOADS=true
- SE_LOG_LEVEL=${LOG_LEVEL}
- SE_SUPERVISORD_LOG_LEVEL=error

selenium-hub:
image: selenium/hub:${TAG}
Expand All @@ -74,6 +77,7 @@ services:
environment:
- SE_LOG_LEVEL=${LOG_LEVEL}
- SE_SESSION_REQUEST_TIMEOUT=${REQUEST_TIMEOUT}
- SE_SUPERVISORD_LOG_LEVEL=error

tests:
image: docker-selenium-tests:latest
Expand Down
1 change: 1 addition & 0 deletions tests/docker-compose-v3-test-video.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ services:
- DISPLAY_CONTAINER_NAME=browser
- SE_VIDEO_FILE_NAME=${VIDEO_FILE_NAME}
- SE_VIDEO_FILE_NAME_SUFFIX=${VIDEO_FILE_NAME_SUFFIX}
- SE_SUPERVISORD_LOG_LEVEL=error

selenium-hub:
image: selenium/hub:${TAG}
Expand Down

0 comments on commit 582fb2c

Please sign in to comment.