Skip to content

Commit

Permalink
[FLINK-17527][flink-dist] Make kubernetes-session.sh use session log4…
Browse files Browse the repository at this point in the history
…j/logback configuration files

This closes apache#12236.
  • Loading branch information
wangyang0918 authored and tillrohrmann committed May 19, 2020
1 parent 7d91197 commit ca5c0a4
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/monitoring/logging.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Log4j2 is controlled using property files. In Flink's case, the file is usually
Flink ships with the following default properties files:

- `log4j-cli.properties`: Used by the Flink command line client (e.g. `flink run`) (not code executed on the cluster)
- `log4j-session.properties`: Used by the Flink command line client when starting a YARN session (`yarn-session.sh`)
- `log4j-session.properties`: Used by the Flink command line client when starting a YARN or Kubernetes session (`yarn-session.sh`, `kubernetes-session.sh`)
- `log4j.properties`: JobManager/Taskmanager logs (both standalone and YARN)

### Compatibility with Log4j1
Expand Down
2 changes: 1 addition & 1 deletion docs/monitoring/logging.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Log4j2 is controlled using property files. In Flink's case, the file is usually
Flink ships with the following default properties files:

- `log4j-cli.properties`: Used by the Flink command line client (e.g. `flink run`) (not code executed on the cluster)
- `log4j-session.properties`: Used by the Flink command line client when starting a YARN session (`yarn-session.sh`)
- `log4j-session.properties`: Used by the Flink command line client when starting a YARN or Kubernetes session (`yarn-session.sh`, `kubernetes-session.sh`)
- `log4j.properties`: JobManager/Taskmanager logs (both standalone and YARN)

### Compatibility with Log4j1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ JVM_ARGS="$JVM_ARGS -Xmx512m"
CC_CLASSPATH=`manglePathList $(constructFlinkClassPath):$INTERNAL_HADOOP_CLASSPATHS`

log=$FLINK_LOG_DIR/flink-$FLINK_IDENT_STRING-k8s-session-$HOSTNAME.log
log_setting="-Dlog.file="$log" -Dlog4j.configuration=file:"$FLINK_CONF_DIR"/log4j-console.properties -Dlog4j.configurationFile=file:"$FLINK_CONF_DIR"/log4j-console.properties -Dlogback.configurationFile=file:"$FLINK_CONF_DIR"/logback-console.xml"
log_setting="-Dlog.file="$log" -Dlog4j.configuration=file:"$FLINK_CONF_DIR"/log4j-session.properties -Dlog4j.configurationFile=file:"$FLINK_CONF_DIR"/log4j-session.properties -Dlogback.configurationFile=file:"$FLINK_CONF_DIR"/logback-session.xml"

export FLINK_CONF_DIR

Expand Down

0 comments on commit ca5c0a4

Please sign in to comment.