diff --git a/build/trivalent.conf b/build/trivalent.conf index a9bd5487..c563069f 100644 --- a/build/trivalent.conf +++ b/build/trivalent.conf @@ -63,4 +63,6 @@ if [ "$ARCH" == "x86_64" ] ; then fi fi +[ "$LOG_LEVEL" >= 2 ] && CHROMIUM_SYSTEM_FLAGS+=" --enable-logging=stderr --v=1" + [ -n "$FEATURES" ] && CHROMIUM_SYSTEM_FLAGS+=" --enable-features=$FEATURES" diff --git a/build/trivalent.sh b/build/trivalent.sh index ca194eea..2625fe31 100755 --- a/build/trivalent.sh +++ b/build/trivalent.sh @@ -44,6 +44,10 @@ declare -rx CHROME_WRAPPER HERE="${CHROME_WRAPPER%/*}" declare -r HERE +# LOG_LEVEL=[0,1,2] +# Default: 0 +declare -ix LOG_LEVEL="${LOG_LEVEL:0}" + declare FEATURES declare CHROMIUM_FLAGS @@ -75,10 +79,10 @@ IS_BROWSER_RUNNING=$? # Fix Singleton process locking if the browser isn't running and the singleton files are present if [[ $IS_BROWSER_RUNNING -eq 1 ]] && compgen -G "$HOME/.config/$CHROMIUM_NAME/Singleton*" > /dev/null; then - echo "Ruh roh! This shouldn't be here..." + [[ "$LOG_LEVEL" > 0 ]] && echo "Ruh roh! This shouldn't be here..." rm "$HOME/.config/$CHROMIUM_NAME/Singleton"* else - echo "A process is already open in this directory or Singleton process files are not present." + [[ "$LOG_LEVEL" > 0 ]] && echo "A process is already open in this directory or Singleton process files are not present." fi # Do this at the end so that everything else still gets hardened_malloc