Type:
Module
Constants:
CLF_TIME_FORMAT : "[%d/%b/%Y:%H:%M:%S %Z]"

The Common Log Format's time format

COMMON_LOG_FORMAT : "%h %l %u %t \"%r\" %s %b"

Common Log Format

CLF : COMMON_LOG_FORMAT

Short alias for Common Log Format

REFERER_LOG_FORMAT : "%{Referer}i -> %U"

Referer Log Format

AGENT_LOG_FORMAT : "%{User-Agent}i"

User-Agent Log Format

COMBINED_LOG_FORMAT : "#{CLF} \"%{Referer}i\" \"%{User-agent}i\""

Combined Log Format

AccessLog provides logging to various files in various formats.

Multiple logs may be written to at the same time:

access_log = [
  [$stderr, WEBrick::AccessLog::COMMON_LOG_FORMAT],
  [$stderr, WEBrick::AccessLog::REFERER_LOG_FORMAT],
]

server = WEBrick::HTTPServer.new :AccessLog => access_log

Custom log formats may be defined. WEBrick::AccessLog provides a subset of the formatting from Apache's mod_log_config httpd.apache.org/docs/mod/mod_log_config.html#formats. See AccessLog::setup_params for a list of supported options

setup_params

setup_params(config, req, res) Instance Public methods This format specification

2015-06-11 10:16:47
format

format(format_string, params) Instance Public methods Formats params

2015-06-11 10:12:56
escape

escape(data) Instance Public methods Escapes control characters in data

2015-06-11 10:05:44