The difference between combined and combinedio Log Formats in Apache

apache-2.2logging

Essentially, the question is in the title. I am familiar with what the combined log format provides, however, I don't understand the difference when compared to the combinedio format. What do the %i and %o do?

Best Answer

See mod_logio documentation.

Combined I/O log format adds 2 additional fields:

  • %I: Bytes received, including request and headers, cannot be zero.
  • %O: Bytes sent, including headers, cannot be zero.

LogFormat example:

"%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\" %I %O"

Log output example:

81.95.52.96 - - [12/Oct/2012:11:25:58 +0100] "GET /docs HTTP/1.1" 200 3623 "http://webarch.net/docs/hosting-logs" "Mozilla/5.0 (X11; Linux i686; rv:15.0) Gecko/20100101 Firefox/15.0.1" 1224 6793