1
0
Fork 0
mirror of https://github.com/element-hq/synapse.git synced 2025-04-08 14:14:00 +00:00
This commit is contained in:
Andrew Ferrazzutti 2025-03-27 15:32:57 -04:00 committed by GitHub
commit 0b8161378e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 6 additions and 2 deletions

1
changelog.d/18274.docker Normal file
View file

@ -0,0 +1 @@
Make some improvements to the prefix-log script in the workers image.

View file

@ -10,6 +10,9 @@
# '-W interactive' is a `mawk` extension which disables buffering on stdout and sets line-buffered reads on
# stdin. The effect is that the output is flushed after each line, rather than being batched, which helps reduce
# confusion due to to interleaving of the different processes.
exec 1> >(awk -W interactive '{print "'"${SUPERVISOR_PROCESS_NAME}"' | "$0 }' >&1)
exec 2> >(awk -W interactive '{print "'"${SUPERVISOR_PROCESS_NAME}"' | "$0 }' >&2)
prefixer() {
mawk -W interactive '{print ENVIRON["SUPERVISOR_PROCESS_NAME"] | "$0; fflush() }'
}
exec 1> >(prefixer)
exec 2> >(prefixer >&2)
exec "$@"