[Improvement] BE could print log foreground when not use daemon mode (#8031)

This commit is contained in:
yiguolei
2022-02-14 09:30:12 +08:00
committed by GitHub
parent 1ff0df9f54
commit a390b766d4
2 changed files with 6 additions and 1 deletions

View File

@ -54,6 +54,10 @@ bool init_glog(const char* basename, bool install_signal_handler) {
return true;
}
if (getenv("DORIS_LOG_TO_STDERR") != nullptr) {
FLAGS_alsologtostderr = true;
}
if (install_signal_handler) {
google::InstallFailureSignalHandler();
}

View File

@ -116,5 +116,6 @@ fi
if [ ${RUN_DAEMON} -eq 1 ]; then
nohup $LIMIT ${DORIS_HOME}/lib/palo_be "$@" >> $LOG_DIR/be.out 2>&1 < /dev/null &
else
$LIMIT ${DORIS_HOME}/lib/palo_be "$@" >> $LOG_DIR/be.out 2>&1 < /dev/null
export DORIS_LOG_TO_STDERR=1
$LIMIT ${DORIS_HOME}/lib/palo_be "$@" 2>&1 < /dev/null
fi