rmetzger commented on a change in pull request #12240:
URL: https://github.com/apache/flink/pull/12240#discussion_r465682800
##########
File path: docs/ops/deployment/native_kubernetes.md
##########
@@ -154,23 +154,10 @@ $ kubectl delete deployment/<ClusterID>
## Log Files
-By default, the JobManager and TaskManager only store logs under
`/opt/flink/log` in each pod.
-If you want to use `kubectl logs <PodName>` to view the logs, you must perform
the following:
+By default, the JobManager and TaskManager will output the logs to console and
`/opt/flink/log` in each pod simultaneously.
Review comment:
```suggestion
By default, the JobManager and TaskManager will output the logs to the
console and `/opt/flink/log` in each pod simultaneously.
```
##########
File path: docs/ops/deployment/native_kubernetes.md
##########
@@ -154,23 +154,10 @@ $ kubectl delete deployment/<ClusterID>
## Log Files
-By default, the JobManager and TaskManager only store logs under
`/opt/flink/log` in each pod.
-If you want to use `kubectl logs <PodName>` to view the logs, you must perform
the following:
+By default, the JobManager and TaskManager will output the logs to console and
`/opt/flink/log` in each pod simultaneously.
+The STDOUT and STDERR will only be redirected to console. You could check for
them via `kubectl logs <PodName>`.
Review comment:
```suggestion
The STDOUT and STDERR will only be redirected to the console. You can access
them via `kubectl logs <PodName>`.
```
##########
File path:
flink-kubernetes/src/test/java/org/apache/flink/kubernetes/kubeclient/decorators/JavaCmdJobManagerDecoratorTest.java
##########
@@ -54,13 +56,14 @@
// Logging variables
private static final String logback =
-
String.format("-Dlogback.configurationFile=file:%s/logback.xml",
FLINK_CONF_DIR_IN_POD);
- private static final String log4j =
-
String.format("-Dlog4j.configurationFile=file:%s/log4j.properties",
FLINK_CONF_DIR_IN_POD);
+ String.format("-Dlogback.configurationFile=file:%s/%s",
FLINK_CONF_DIR_IN_POD, CONFIG_FILE_LOGBACK_NAME);
+ private static final String log4j = String.format(
+ "-Dlog4j.configuration=file:%s/%s
-Dlog4j.configurationFile=file:%s/%s",
Review comment:
same question as above :)
##########
File path:
flink-kubernetes/src/main/java/org/apache/flink/kubernetes/utils/KubernetesUtils.java
##########
@@ -213,10 +211,11 @@ private static String getLogging(String logFile, String
confDir, boolean hasLogb
if (hasLogback || hasLog4j) {
logging.append("-Dlog.file=").append(logFile);
if (hasLogback) {
- logging.append("
-Dlogback.configurationFile=file:").append(confDir).append("/logback.xml");
+ logging.append("
-Dlogback.configurationFile=file:").append(confDir).append("/").append(CONFIG_FILE_LOGBACK_NAME);
}
if (hasLog4j) {
- logging.append("
-Dlog4j.configurationFile=file:").append(confDir).append("/log4j.properties");
+ logging.append("
-Dlog4j.configuration=file:").append(confDir).append("/").append(CONFIG_FILE_LOG4J_NAME)
+ .append("
-Dlog4j.configurationFile=file:").append(confDir).append("/").append(CONFIG_FILE_LOG4J_NAME);
}
Review comment:
why is it necessary to define both `log4j.configuration` and
`log4j.configurationFile` ?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]