docs/Other default options
Updated 2026-106 min read

Other default options

Besides site, proxy and security options, the http node holds a group of defaults that control how access logs are written.

1 Log format options

{
  "http": {
    "log_split": " ",
    "log_format": [
      "user_agent", "time", "type", "method", "path"
    ]
  }
}
OptionTypeDescription
log_splitStringSeparator placed between log fields, a single space in the example
log_formatArray of stringsFields written to the log and their order; joined with log_split

2 Variables accepted by log_format

Each entry of log_format is one of the following:

VariableMeaning
user_agentClient User-Agent
ip_portClient IP and port
timeRequest time
typeLog type
methodHTTP method
pathRequest path
hostRequested host name
statusResponse status code
sizeResponse body size
refererReferer address

3 Examples

Log the client IP and port, time, method, path and status with the default separator:

{
  "http": {
    "log_split": " ",
    "log_format": [
      "ip_port", "time", "method", "path", "status"
    ]
  }
}

To make logs easy to split later, pick a separator that never appears inside a field:

{
  "http": {
    "log_split": "|",
    "log_format": [
      "time", "ip_port", "method", "path", "status", "size", "user_agent"
    ]
  }
}
User-Agent values can contain spaces, so a space separator makes the field count unstable when parsing. Prefer |, \t or another character unlikely to appear in the content.