Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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.

like image 449
hatellla Avatar asked Mar 17 '15 11:03

hatellla


Video Answer


1 Answers

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.

like image 122
condit Avatar answered Oct 16 '22 05:10

condit