mirror of
https://mau.dev/maunium/synapse.git
synced 2024-11-18 07:52:56 +01:00
d743b25c8f
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
12 lines
369 B
Bash
Executable file
12 lines
369 B
Bash
Executable file
#!/bin/bash
|
|
#
|
|
# Prefixes all lines on stdout and stderr with the process name (as determined by
|
|
# the SUPERVISOR_PROCESS_NAME env var, which is automatically set by Supervisor).
|
|
#
|
|
# Usage:
|
|
# prefix-log command [args...]
|
|
#
|
|
|
|
exec 1> >(awk '{print "'"${SUPERVISOR_PROCESS_NAME}"' | "$0}' >&1)
|
|
exec 2> >(awk '{print "'"${SUPERVISOR_PROCESS_NAME}"' | "$0}' >&2)
|
|
exec "$@"
|