You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Yang Wang (Jira)" <ji...@apache.org> on 2020/05/18 04:23:00 UTC

[jira] [Commented] (FLINK-15792) Make Flink logs accessible via kubectl logs per default

    [ https://issues.apache.org/jira/browse/FLINK-15792?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17109827#comment-17109827 ] 

Yang Wang commented on FLINK-15792:
-----------------------------------

Just like what we have discussed in the PR[1] of FLINK-17166, we do not find a reasonable way to output STDOUT/STDERR to console and log file simultaneously. So in FLINK-17166, we start with only outputting logs to console and files simultaneously. And leave the STDOUT/STDERR for the open question to be done later.

 

For this ticket, we are in the same situation. If we make the logs output console per default, then we will not be able to access the STDOUT/STDERR in the Flink web dashboard. I think it is burden for users. So i suggest to still leave this in the document[2] if users want to use {{kubectl logs}} to view the logs.

 

[1]. [https://github.com/apache/flink/pull/11839]

[2]. [https://ci.apache.org/projects/flink/flink-docs-master/ops/deployment/native_kubernetes.html#log-files]

> 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.2
>
>
> 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)