httpserver.log and the Log File Format

The web2py web server logs all requests to a file called:

  1. httpserver.log

in the root web2py directory. An alternative filename and location can be specified via web2py command-line options.

New entries are appended to the end of the file each time a request is made. Each line looks like this:

  1. 127.0.0.1, 2008-01-12 10:41:20, GET, /admin/default/site, HTTP/1.1, 200, 0.270000

The format is:

  1. ip, timestamp, method, path, protocol, status, time_taken

Where

  • ip is the IP address of the client who made the request
  • timestamp is the date and time of the request in ISO 8601 format, YYYY-MM-DDT HH:MM:SS
  • method is either GET or POST
  • path is the path requested by the client
  • protocol is the HTTP protocol used to send to the client, usually HTTP/1.1
  • status is the one of the HTTP status codes [status]
  • time_taken is the amount of time the server took to process the request, in seconds, not including upload/download time.

In the appliances repository [appliances] , you will find an appliance for log analysis.

This logging is disabled by default when using mod_wsgi since it would be the same as the Apache log.