mirror of
https://github.com/sourcebot-dev/sourcebot.git
synced 2025-12-11 20:05:25 +00:00
fix(structured_logs): Remove prefix (#443)
* fix prefix issue * changelog
This commit is contained in:
parent
a3d9711178
commit
6a601872e0
2 changed files with 14 additions and 3 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -1,7 +1,15 @@
|
|||
#!/bin/sh
|
||||
|
||||
# @see : https://github.com/Supervisor/supervisor/issues/553#issuecomment-1353523182
|
||||
|
||||
# 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
|
||||
Loading…
Reference in a new issue