Skip to content

Instantly share code, notes, and snippets.

@ytensor42
Created October 14, 2018 07:40
Show Gist options
  • Save ytensor42/64dfe37b821481e225aee8d438da7e40 to your computer and use it in GitHub Desktop.
Save ytensor42/64dfe37b821481e225aee8d438da7e40 to your computer and use it in GitHub Desktop.
Tomcat AccessLogValve values
# grep -A5 Valve $TOMCAT/conf/server.xml
Patterns for the logged message may include constant text or any of the following replacement strings, for which the corresponding information from the specified Response is substituted:
%a - Remote IP address
%A - Local IP address
%b - Bytes sent, excluding HTTP headers, or '-' if no bytes were sent
%B - Bytes sent, excluding HTTP headers
%h - Remote host name (or IP address if enableLookups for the connector is false)
%H - Request protocol
%l - Remote logical username from identd (always returns '-')
%m - Request method
%p - Local port
%q - Query string (prepended with a '?' if it exists, otherwise an empty string
%r - First line of the request
%s - HTTP status code of the response
%S - User session ID
%t - Date and time, in Common Log Format format
%u - Remote user that was authenticated
%U - Requested URL path
%v - Local server name
%D - Time taken to process the request, in millis
%T - Time taken to process the request, in seconds
%I - current Request thread name (can compare later with stacktraces)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment