Log format

On this page

Still need help?

The Atlassian Community is here for you.

Ask the community

Warning

(warning) Any change of default pattern configuration is highly not recommended.

JIRA pattern configuration for the logged messages:

<Server>
    <Service name="Catalina">
		<Engine>
(...)
			<Valve className="org.apache.catalina.valves.AccessLogValve" pattern="%a %{jira.request.id}r %{jira.request.username}r %t &quot;%m %U%q %H&quot; %s %b %D &quot;%{Referer}i&quot; &quot;%{User-Agent}i&quot; &quot;%{jira.request.assession.id}r&quot;"/>
        </Engine>
    </Service>
</Server>

Values for the pattern attribute are made up of literal text strings, combined with pattern identifiers prefixed by the "%" character to cause replacement by the corresponding variable value from the current request and response. The following pattern codes are supported:

Default JIRA valueDescription
%a
Remote IP address
%t
Date and time, in Common Log Format format
%m
Request method
%U
Requested URL path
%q
Query string
%H
Request protocol
%s
HTTP status code of the response
%b
Bytes sent
%D
Time taken to process the request


There is also support to write information from the cookie, incoming header, the Session or something else in the ServletRequest:

Default JIRA valueDescription
%{jira.request.id}r
Request ID
%{jira.request.username}r
Request username
%{Referer}i
Referer address
%{User-Agent}i
User agent
Variable type 
%{xxx}i 
for incoming headers
%{xxx}r 
xxx is an attribute in the ServletRequest

Some of these patterns contain double quotes, as they are required for log parsers since some entries may contain white characters (spaces or tabs):

Default JIRA valueDescription
&quot;
"



Last modified on Dec 1, 2017

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.