mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-12-02 18:34:29 +08:00
fix: update the logs output format
This commit is contained in:
parent
5479c39d49
commit
df20f98348
@ -32,7 +32,6 @@ openim::log::info "\n# Begin to check all openim service"
|
||||
|
||||
handle_error() {
|
||||
echo "An error occurred. Printing ${STDERR_LOG_FILE} contents:"
|
||||
cat "${STDERR_LOG_FILE}"
|
||||
exit 1
|
||||
}
|
||||
|
||||
|
||||
@ -95,9 +95,10 @@ function openim::msgtransfer::check_by_signal() {
|
||||
openim::log::error "Found $NUM_PROCESSES processes for $OPENIM_OUTPUT_HOSTBIN/openim-msgtransfer"
|
||||
for PID in $PIDS; do
|
||||
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
|
||||
openim::log::error ps -p $PID -o pid,cmd
|
||||
openim::log::error "$(ps -p $PID -o pid=,cmd= | awk '{print "PID: " $1 ", CMD: " $2}')"
|
||||
elif [[ "$OSTYPE" == "darwin"* ]]; then
|
||||
openim::log::error ps -p $PID -o pid,comm
|
||||
# 优化后的命令
|
||||
openim::log::error "$(ps -p $PID -o pid=,cmd= | awk '{print "PID: " $1 ", CMD: " $2}')"
|
||||
else
|
||||
openim::log::error "Unsupported OS type: $OSTYPE"
|
||||
fi
|
||||
|
||||
@ -34,6 +34,4 @@ openim::util::stop_services_by_signal ${OPENIM_SERVER_PORT_LISTARIES[@]}
|
||||
|
||||
openim::util::stop_services_by_name_signal "${OPENIM_OUTPUT_HOSTBIN}"
|
||||
|
||||
echo "++ Check if the services have been stopped"
|
||||
|
||||
openim::log::success "✨ All processes to be killed"
|
||||
Loading…
x
Reference in New Issue
Block a user