Skip to content

Commit

Permalink
[FLINK-17827][scala-shell] Setup default logging settings
Browse files Browse the repository at this point in the history
  • Loading branch information
paul8263 committed Jan 4, 2021
1 parent 201803c commit 507e7c5
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions flink-scala-shell/start-script/start-scala-shell.sh
Original file line number Diff line number Diff line change
Expand Up @@ -82,15 +82,15 @@ fi
MODE=$1
LOG=$FLINK_LOG_DIR/flink-$FLINK_IDENT_STRING-scala-shell-$MODE-$HOSTNAME.log

if [[ ($MODE = "local") || ($MODE = "remote") ]]
then
LOG4J_CONFIG=log4j.properties
LOGBACK_CONFIG=logback.xml
elif [[ $1 = "yarn" ]]
if [[ $MODE = "yarn" ]]
then
LOG4J_CONFIG=log4j-session.properties
LOGBACK_CONFIG=logback-session.xml
FLINK_CLASSPATH=$FLINK_CLASSPATH:$HADOOP_CLASSPATH:$HADOOP_CONF_DIR:$YARN_CONF_DIR
else
# Set the default log config when MODE is something other than yarn. eg: local, remote or other invalid mode.
LOG4J_CONFIG=log4j.properties
LOGBACK_CONFIG=logback.xml
fi

log_setting=("-Dlog.file=$LOG" "-Dlog4j.configuration=file:$FLINK_CONF_DIR/$LOG4J_CONFIG" "-Dlog4j.configurationFile=file:$FLINK_CONF_DIR/$LOG4J_CONFIG" "-Dlogback.configurationFile=file:$FLINK_CONF_DIR/$LOGBACK_CONFIG")
Expand Down

0 comments on commit 507e7c5

Please sign in to comment.