From bd792daf63ee0b0377d03ddbbeca0c2832795391 Mon Sep 17 00:00:00 2001 From: Rootkit404 <175176948+RKNF404@users.noreply.github.com> Date: Wed, 26 Nov 2025 23:33:39 -0500 Subject: [PATCH 1/3] chore(wrapper): make output logging configurable via env var --- build/trivalent.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/build/trivalent.sh b/build/trivalent.sh index ca194eea..76293e06 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 LOG_LEVEL + 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 From b9d45d6a37e9baca66caa78226a0cdb8ff8fa073 Mon Sep 17 00:00:00 2001 From: Rootkit404 <175176948+RKNF404@users.noreply.github.com> Date: Wed, 26 Nov 2025 23:45:12 -0500 Subject: [PATCH 2/3] chore(wrapper): set default properly for LOG_LEVEL --- build/trivalent.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/trivalent.sh b/build/trivalent.sh index 76293e06..2625fe31 100755 --- a/build/trivalent.sh +++ b/build/trivalent.sh @@ -46,7 +46,7 @@ declare -r HERE # LOG_LEVEL=[0,1,2] # Default: 0 -declare LOG_LEVEL +declare -ix LOG_LEVEL="${LOG_LEVEL:0}" declare FEATURES declare CHROMIUM_FLAGS From a4e2b959832709172782e1901a2a60dabb57143f Mon Sep 17 00:00:00 2001 From: Rootkit404 <175176948+RKNF404@users.noreply.github.com> Date: Wed, 26 Nov 2025 23:48:28 -0500 Subject: [PATCH 3/3] chore(conf): add verbose logging for chromium to LOG_LEVEL --- build/trivalent.conf | 2 ++ 1 file changed, 2 insertions(+) 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"