From 9fb709087d010b04e4d784be2f16969449fed279 Mon Sep 17 00:00:00 2001 From: Dmitry Maksyoma Date: Sun, 28 Feb 2021 21:21:49 +1300 Subject: [PATCH] Add verbose logging via KASMVNC_VERBOSE_LOGGING env var Running "KASMVNC_VERBOSE_LOGGING=1 builder/test-deb debian buster" will turn on verbose logging of kasmvncserver. --- builder/startup/vnc_startup.sh | 3 ++- builder/test-deb | 4 +++- builder/test-rpm | 5 ++++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/builder/startup/vnc_startup.sh b/builder/startup/vnc_startup.sh index c8972e5..93c6079 100755 --- a/builder/startup/vnc_startup.sh +++ b/builder/startup/vnc_startup.sh @@ -87,9 +87,10 @@ vncserver -kill $DISPLAY &> $HOME/.vnc/vnc_startup.log \ detect_www_dir detect_cert_location +[ -n "$KASMVNC_VERBOSE_LOGGING" ] && verbose_logging_option="-log *:stderr:100" echo -e "start vncserver with param: VNC_COL_DEPTH=$VNC_COL_DEPTH, VNC_RESOLUTION=$VNC_RESOLUTION\n..." -vncserver $DISPLAY -depth $VNC_COL_DEPTH -geometry $VNC_RESOLUTION -FrameRate=$MAX_FRAME_RATE -websocketPort $VNC_PORT $cert_option -sslOnly -interface 0.0.0.0 $VNCOPTIONS $package_www_dir_option #-log *:stderr:100 #&> $STARTUPDIR/no_vnc_startup.log +vncserver $DISPLAY -depth $VNC_COL_DEPTH -geometry $VNC_RESOLUTION -FrameRate=$MAX_FRAME_RATE -websocketPort $VNC_PORT $cert_option -sslOnly -interface 0.0.0.0 $VNCOPTIONS $package_www_dir_option $verbose_logging_option #&> $STARTUPDIR/no_vnc_startup.log PID_SUN=$! diff --git a/builder/test-deb b/builder/test-deb index 86aa7c6..9114a3e 100755 --- a/builder/test-deb +++ b/builder/test-deb @@ -8,5 +8,7 @@ cd "$(dirname "$0")" docker build --build-arg KASMVNC_PACKAGE_DIR="build/${os_codename}" \ -t kasmvnctester_${os}:$os_codename \ -f dockerfile.${os}_${os_codename}.deb.test . -docker run -it -p 443:8443 --rm -e "VNC_USER=foo" -e "VNC_PW=foobar" \ +docker run -it -p 443:8443 --rm \ + -e KASMVNC_VERBOSE_LOGGING=$KASMVNC_VERBOSE_LOGGING \ + -e "VNC_USER=foo" -e "VNC_PW=foobar" \ kasmvnctester_${os}:$os_codename diff --git a/builder/test-rpm b/builder/test-rpm index 7ecda73..719b65f 100755 --- a/builder/test-rpm +++ b/builder/test-rpm @@ -10,5 +10,8 @@ docker build --build-arg \ KASMVNC_PACKAGE_DIR="build/${os}_${os_codename}" \ -t kasmvnctester_${os}:$os_codename \ -f dockerfile.${os}_${os_codename}.rpm.test . -echo docker run -it -p 443:8443 --rm -e "VNC_USER=foo" -e "VNC_PW=foobar" \ + +docker run -it -p 443:8443 --rm \ + -e KASMVNC_VERBOSE_LOGGING=$KASMVNC_VERBOSE_LOGGING \ + -e "VNC_USER=foo" -e "VNC_PW=foobar" \ kasmvnctester_${os}:$os_codename