fix(bin/emqx): fix boot log

prior to this fix the logger message (syslog) has the name and pid
missing.
with this change, the programe name, and its boot command is logged
to syslog, so the console boot is cleaner
This commit is contained in:
Zaiming Shi 2021-07-31 00:18:56 +02:00
parent 3604593b86
commit 2e3c98dd55
1 changed files with 3 additions and 9 deletions

View File

@ -598,13 +598,8 @@ case "$1" in
-mnesia dir "\"${MNESIA_DATA_DIR}\"" \
$RELX_CONFIG_PATH $CONFIG_ARGS $EPMD_ARG
# Dump environment info for logging purposes
echo "Exec: $*" -- ${1+$ARGS}
echo "Root: $ROOTDIR"
# Log the startup
echo "$RUNNER_ROOT_DIR"
logger -t "${REL_NAME[$$]}" "Starting up"
logger -t "${REL_NAME}[$$]" "$* -- ${1+$ARGS}"
# Start the VM
exec "$@" -- ${1+$ARGS}
@ -644,9 +639,8 @@ case "$1" in
-mnesia dir "\"${MNESIA_DATA_DIR}\"" \
$RELX_CONFIG_PATH $CONFIG_ARGS $EPMD_ARG
# Dump environment info for logging purposes
echo "Exec: $*" -- ${1+$ARGS}
echo "Root: $ROOTDIR"
# Log the startup
logger -t "${REL_NAME}[$$]" "$* -- ${1+$ARGS}"
# Start the VM
exec "$@" -- ${1+$ARGS}