You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by tr...@apache.org on 2020/05/19 12:59:54 UTC
[flink] 02/02: [FLINK-17527][flink-dist] Make kubernetes-session.sh
use session log4j/logback configuration files
This is an automated email from the ASF dual-hosted git repository.
trohrmann pushed a commit to branch release-1.11
in repository https://gitbox.apache.org/repos/asf/flink.git
commit 39a6fc03f03b4feb9970bf5d21777180e43faed3
Author: wangyang0918 <da...@alibaba-inc.com>
AuthorDate: Mon May 18 15:53:55 2020 +0800
[FLINK-17527][flink-dist] Make kubernetes-session.sh use session log4j/logback configuration files
This closes #12236.
---
docs/monitoring/logging.md | 2 +-
docs/monitoring/logging.zh.md | 2 +-
flink-dist/src/main/flink-bin/kubernetes-bin/kubernetes-session.sh | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/docs/monitoring/logging.md b/docs/monitoring/logging.md
index 5debe09..4fbfb59 100644
--- a/docs/monitoring/logging.md
+++ b/docs/monitoring/logging.md
@@ -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
diff --git a/docs/monitoring/logging.zh.md b/docs/monitoring/logging.zh.md
index c2b2d42..a690e11 100644
--- a/docs/monitoring/logging.zh.md
+++ b/docs/monitoring/logging.zh.md
@@ -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
diff --git a/flink-dist/src/main/flink-bin/kubernetes-bin/kubernetes-session.sh b/flink-dist/src/main/flink-bin/kubernetes-bin/kubernetes-session.sh
index a2cb456..dfe4895 100644
--- a/flink-dist/src/main/flink-bin/kubernetes-bin/kubernetes-session.sh
+++ b/flink-dist/src/main/flink-bin/kubernetes-bin/kubernetes-session.sh
@@ -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