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

ASF GitHub Bot commented on FLINK-6387:
---------------------------------------

Github user zentol commented on a diff in the pull request:

    https://github.com/apache/flink/pull/3777#discussion_r113406843
  
    --- Diff: 
flink-runtime-web/src/main/java/org/apache/flink/runtime/webmonitor/HttpRequestHandler.java
 ---
    @@ -183,4 +194,28 @@ else if (currentDecoder != null && msg instanceof 
HttpContent) {
                        }
                }
        }
    +
    +  /**
    +   * Record the access log if enable configure of
    +   * {@link 
org.apache.flink.configuration.ConfigConstants#JOB_MANAGER_WEB_ACCESSLOG_ENABLE}.
    +   * record format:
    +   * remote_addr - [time_local] "request_method URI protocolVersion" 
"http_referer" "http_user_agent"
    +   */
    +   private void accesslog(ChannelHandlerContext ctx, HttpRequest req) {
    +           HttpHeaders headers = req.headers();
    +           if (headers != null) {
    +                   String line = ctx.channel().remoteAddress() + " - [" + 
new Date() + "] \""
    --- End diff --
    
    Please merge this string generation into the log statement.


> Flink UI support access log
> ---------------------------
>
>                 Key: FLINK-6387
>                 URL: https://issues.apache.org/jira/browse/FLINK-6387
>             Project: Flink
>          Issue Type: Improvement
>          Components: Webfrontend
>            Reporter: shijinkui
>            Assignee: shijinkui
>
> Record the use request to the access log. Append use access to the log file.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to