From 2e3c98dd55bb769e22b811743a0d13076c224ff2 Mon Sep 17 00:00:00 2001 From: Zaiming Shi Date: Sat, 31 Jul 2021 00:18:56 +0200 Subject: [PATCH] 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 --- bin/emqx | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/bin/emqx b/bin/emqx index fd6986614..e8fda9c2b 100755 --- a/bin/emqx +++ b/bin/emqx @@ -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}