• access_log

语法:*accesslog path [format [buffer=size | off ] 默认值:_access_log log/access.log combined*

作用域:*http, server, location*

语法:*log_format name format [format …]*

默认值:*log_format combined "…"*

Directive log_format describes the format of a log entry. Besides general variables in the format it is possible to use variables which exist only at the moment of record into the log:

  • $body_bytes_sent, the number of bytes, transmitted to client minus the response headers, variable is compatible with parameter %B of module Apache's mod_log_config (this was called $apache_bytes_sent, before version 0.3.10)
  • $bytes_sent, the number of bytes, transmitted to client
  • $connection, the number of connection
  • $msec, the time with an accuracy to microseconds at the moment of the log entry
  • $pipe, "p" if request was pipelining
  • $request_time, the time of working on request in seconds
  • $status, status of answer
  • $timelocal, local time into common log format.
    The headers, transmitted to client, begin from the prefix "sent_http
    ", for example, $sent_http_content_range.

In the configuration there is always a predetermined format "combined":