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

Yang Wang commented on FLINK-17166:
-----------------------------------

cc [~azagrebin] [~trohrmann]

After a rough implementation, i find that the {{tee}} command could not satisfy 
our requirements. At first, we use {{ConsoleAppender}} and {{FileAppender}} to 
output the logs to console and file at the same time. However, when we use 
{{tee}} to output the stdout/stderr to another file, the normal 
JobManager/TaskManager logs will also be added into the 
jobmanager.out/taskmanager.out. Then we have to {{grep}} out the log4j pattern 
logs just like following. I do not think this is a good solution and will try 
to find other ways.

 
{code:java}
# Log layout pattern is %d{yyyy-MM-dd HH:mm:ss,SSS} %-5p ...
LOG4J_LAYOUT_PATTERN="^[0-9]{4}-[0-9]{2}-[0-9]{2} 
[0-9]{2}:[0-9]{2}:[0-9]{2},[0-9]{3} TRACE|DEBUG|INFO|WARN|ERROR"
echo "Starting $SERVICE as a console application on host $HOSTNAME."
exec $JAVA_RUN $JVM_ARGS ${FLINK_ENV_JAVA_OPTS} "${log_setting[@]}" -classpath 
"`manglePathList "$FLINK_TM_CLASSPATH:$INTERNAL_HADOOP_CLASSPATHS"`" 
${CLASS_TO_RUN} "${ARGS[@]}" 2>&1 | tee >(grep --line-buffered -v -E 
"$LOG4J_LAYOUT_PATTERN" >"$out")
{code}

> Modify the log4j-console.properties to also output logs into the files for 
> WebUI
> --------------------------------------------------------------------------------
>
>                 Key: FLINK-17166
>                 URL: https://issues.apache.org/jira/browse/FLINK-17166
>             Project: Flink
>          Issue Type: Sub-task
>          Components: Runtime / Configuration
>            Reporter: Andrey Zagrebin
>            Assignee: Yang Wang
>            Priority: Major
>             Fix For: 1.11.0
>
>




--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to