[ https://issues.apache.org/jira/browse/FLINK-15792?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17029521#comment-17029521 ]
Yang Wang commented on FLINK-15792: ----------------------------------- Yeah, you are right. Adding a new log4j properties file will take some more confusions for our users. That is why i put it how to view the logs by {{kubectl logs}} in the documentation, not add a new log4j properties file by default. I want to share how we have done in our internal use. We support to start a sidecar container(e.g. fluentd), all the logs will be shared via volume to the sidecar container. It could be used to collect the logs to HDFS, elastics search, etc. Or directly print the logs to the stdout. Then we could use {{kubectl logs -c sidecar}} to view the logs. If the uses do not start the sidecar container, then one could use the command {{kubectl exec flink-native-k8s-session-1-f646f949f-rt4qw cat /opt/flink/log/jobmanager.log}}. > Make Flink logs accessible via kubectl logs per default > ------------------------------------------------------- > > Key: FLINK-15792 > URL: https://issues.apache.org/jira/browse/FLINK-15792 > Project: Flink > Issue Type: Sub-task > Components: Deployment / Kubernetes > Affects Versions: 1.10.0 > Reporter: Till Rohrmann > Priority: Major > Fix For: 1.11.0, 1.10.1 > > > I think we should make Flink's logs accessible via {{kubectl logs}} per > default. Firstly, this is the idiomatic way to obtain the logs from a > container on Kubernetes. Secondly, especially if something does not work and > the container cannot start/stops abruptly, there is no way to log into the > container and look for the log.file. This makes debugging the setup quite > hard. > I think the best way would be to create the Flink Docker image in such a way > that it logs to stdout. In order to allow access to the log file from the web > ui, it should also create a log file. One way to achieve this is to add a > ConsoleAppender to the respective logging configuration. Another way could be > to start the process in the console mode and then to teeing the stdout output > into the log file. -- This message was sent by Atlassian Jira (v8.3.4#803005)