mirror of
https://github.com/element-hq/synapse.git
synced 2025-04-08 14:14:00 +00:00
Merge 8f81ec2ed7
into 3c188231c7
This commit is contained in:
commit
0b8161378e
2 changed files with 6 additions and 2 deletions
1
changelog.d/18274.docker
Normal file
1
changelog.d/18274.docker
Normal file
|
@ -0,0 +1 @@
|
|||
Make some improvements to the prefix-log script in the workers image.
|
|
@ -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 "$@"
|
||||
|
|
Loading…
Add table
Reference in a new issue