wangyang0918 edited a comment 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). Not all entrypoints need to do redirect the streams. Currently, i think only the docker environment deployment need(e.g. standalone, K8s). We could put it in the first line in the main of `XXXEntrypoint` and i do not find a logging system cache problem here. As you have said that the logging framework will cache the `OutputStream` at creation time, could you share me more insights 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`. And the filtering is not a stable and good solution. ---------------------------------------------------------------- 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]
