Meaning of each field in default Format of HTTP Request Log in DropWizard

我怕爱的太早我们不能终老 提交于 2020-03-17 08:58:44

问题


The access log that get generated in Dropwizard are something of following format:-

10.10.10.10 - - [16/Mar/2015:23:59:59 +0530] "GET /yyyy/vx.x/uri HTTP/1.1" 200 - "-" "-" 1

Field 1 :- 10.10.10.10 (Ip Address from which request came)

Field 2 :- [16/Mar/2015:23:59:59 +0530] (Time and Date when request came)

Field 3 :- "GET /yyyy/vx.x/uri HTTP/1.1" (HTTP Rest API method)

Field 4 :- 200 (HTTP Response code)

Field 5 :- "-" (????)

Field 6 :- "-" (????) Field 7 :- 1 (????)

Can someone explain the meaning of each field in access log format? I am more curious about the last column meaning.

Thanks for help.


回答1:


This logging is actually generated by Jetty and is an extended version of the NCSA common log format. You can view the source (search for the log method).

The default settings log the following:

  • The remote server address

  • Optional authentication information

  • Request date and time

  • The HTTP method, URI, and protocol for the request

  • The HTTP response status code

  • The length of the response

  • The HTTP referer header (if set)

  • The HTTP user agent (if set)

  • The log latency

The last field (which you asked about in particular) is the latency in milliseconds between the time of the request and the construction of the log message - effectively how long it took the server to handle the request.



来源:https://stackoverflow.com/questions/29098340/meaning-of-each-field-in-default-format-of-http-request-log-in-dropwizard

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!