wangyang0918 commented on pull request #11839:
URL: https://github.com/apache/flink/pull/11839#issuecomment-619471329


   @zentol Thanks a lot for your review.
   
   I agree with you that introducing the stream redirections may take some 
problems. So we need to be very careful to enable the redirection via 
`StdOutErrRedirector.redirectStdOutErr`. Currently, i only see the requirements 
when we want to output the stdout/err to log files and console at the same 
time. Also i do not have seen a better solution. Using the `tee` will make us 
have to use the `grep` to filter out the log4j loggings. Just as the discussion 
in the 
[ticket](https://issues.apache.org/jira/browse/FLINK-17166?focusedCommentId=17087643&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-17087643).
   
   Also not all entrypoints need to do this. I think only the docker 
environment deployment need(e.g. standalone, K8s). We could put it in the first 
line in the main of `XXEntrypoint` and i do not find a logging system cache 
problem here.
   
   The most important concerns when i have to introduce the stream redirection 
is not about the mixing the `.out` and `.err` file. It is we have to filter out 
the log4j logging from the stdout/err when using `tee`.
   Actually, the YARN and K8s deployment always put the stdout to `.out` file 
and stderr to `.err` file. And i think it is better to separate them.
   


----------------------------------------------------------------
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]


Reply via email to