Class JsonAccessLogValve

All Implemented Interfaces:
MBeanRegistration, AccessLog, Contained, JmxEnabled, Lifecycle, Valve

public class JsonAccessLogValve extends AccessLogValve
Access log valve derivative that rewrites entries as JSON.

Important note: the attribute names are not final.

Patterns are mapped to attributes as followed:

  • a: remoteAddr
  • A: localAddr
  • b: size (byteSent: size)
  • B: byteSentNC
  • D: elapsedTime
  • F: firstByteTime
  • h: host
  • H: protocol
  • l: logicalUserName
  • m: method
  • p: port
  • q: query
  • r: request
  • s: statusCode
  • S: sessionId
  • t: time (dateTime: time)
  • T: elapsedTimeS
  • u: user
  • U: path (requestURI: path)
  • v: localServerName
  • I: threadName
  • X: connectionStatus
  • %{xxx}a: remoteAddress-xxx
  • %{xxx}p: port-xxx
  • %{xxx}t: time-xxx
  • %{xxx}c: cookies
  • %{xxx}i: requestHeaders
  • %{xxx}o: responseHeaders
  • %{xxx}r: requestAttributes
  • %{xxx}s: sessionAttributes
The attribute list is based on https://github.com/fluent/fluentd/blob/master/lib/fluent/plugin/parser_apache2.rb#L72