From 34b1f4976c5de441db5aa635039475c4d096bd4e Mon Sep 17 00:00:00 2001 From: msukkari Date: Thu, 7 Aug 2025 10:34:14 -0700 Subject: [PATCH 1/2] fix prefix issue --- prefix-output.sh | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/prefix-output.sh b/prefix-output.sh index 0364bfd7c..7cd3f8200 100644 --- a/prefix-output.sh +++ b/prefix-output.sh @@ -1,7 +1,15 @@ #!/bin/sh # @see : https://github.com/Supervisor/supervisor/issues/553#issuecomment-1353523182 -exec 1> >( perl -ne '$| = 1; print "['"${SUPERVISOR_PROCESS_NAME}"'] | $_"' >&1) -exec 2> >( perl -ne '$| = 1; print "['"${SUPERVISOR_PROCESS_NAME}"'] | $_"' >&2) -exec "$@" \ No newline at end of file +# Check if structured logging is enabled +if [ "${SOURCEBOT_STRUCTURED_LOGGING_ENABLED}" = "true" ]; then + # Don't prefix output, just execute the command directly + exec "$@" +else + # Apply prefix to output + exec 1> >( perl -ne '$| = 1; print "['"${SUPERVISOR_PROCESS_NAME}"'] | $_"' >&1) + exec 2> >( perl -ne '$| = 1; print "['"${SUPERVISOR_PROCESS_NAME}"'] | $_"' >&2) + + exec "$@" +fi \ No newline at end of file From a4df266fec84f1a7a5c7d64d9356edd251a6b6b0 Mon Sep 17 00:00:00 2001 From: msukkari Date: Thu, 7 Aug 2025 10:38:39 -0700 Subject: [PATCH 2/2] changelog --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 996f1aec6..f1ba768d8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added - Added multi-branch indexing support for Gerrit. [#433](https://github.com/sourcebot-dev/sourcebot/pull/433) +### Fixed +- Removed prefix from structured log output. [#443](https://github.com/sourcebot-dev/sourcebot/pull/443) + ## [4.6.3] - 2025-08-04 ### Fixed