Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

HTTP access logs help you monitor information such as the persons who access the product, how many hits are received, what the errors are, etc. This information is useful for troubleshooting errors.

All WSO2 products can enable access logs for the HTTP servlet transport. This servlet transport works on 9443/9763 ports, and it receives admin/operation requests. Therefore, access logs for the servert transport is useful for analysing operational/admin-level access details. Additionally, in products such as WSO2 Enterprise Service Bus, WSO2 Enterprise Integrator (and WSO2 API Manager), access logs can be generated for the PassThrough and NIO transports. The PassThrough/NIO transports works on 8280/8243 ports and is used for API/Service invocations. By default, the access logs from both the servlet transport and the PassThrough/NIO transports are written to a common access log file located in the <EI_HOME>/repository/logs/ directory.

...

...

Note that access logs for the HTTP servlet transport logs details of the request as well as the response on a single log line. However, the access logs for the PassThrough transport logs the request and the response on two separate log lines.

See the topics given below to configure the default behaviour of HTTP access logs in the ESB.

Table of Contents

Configuring access logs for the HTTP servlet transport

Note

Note that access logs for the HTTP servlet transport logs details of the request as well as the response on a single log line.

As the runtime of WSO2 products is based on Apache Tomcat, you can use the Access_Log_Valve variable in Tomcat as explained below to configure access logs for the HTTP servlet transport:

...

Configuring access logs for the PassThrough and NIO transports (Service/API invocation)

Tipnote

Not Note that the PassThrough transport is only used by WSO2 Enterprise Service Bus, WSO2 Enterprise Integrator, and WSO2 API Manageraccess logs for the PassThrough/NIO transports log the request and the response on two separate log lines.

By default, access logs related to service/API invocation are disabled for performance reasons in the above products. You should enable these access log only for troubleshooting errors. Follow the steps given below to enable access logs for the PassThrough transport:

...

AttributeDescription
%a

Remote IP address

%A

Local IP address

%b

Bytes sent, excluding HTTP headers, or '-' if zero

%B

Bytes sent, excluding HTTP headers

%c

Cookie value

%C

Accept header

%e

Accept Encoding

%E

Transfer Encoding

%h

Remote host name (or IP address if enableLookups for the connector is false)

%l

Remote logical username from identd (always returns '-')

%L

Accept Language

%k

Keep Alive

%m

Request method (GET, POST, etc.)

%n

Content Encoding

%r

Request Element

%s

HTTP status code of the response

%S

Accept Chatset

%t

Date and time, in Common Log Format

%T

Time taken to process the request in seconds.

%u

Remote user that was authenticated (if any), else '-'

%U

Requested URL path

%v

Local server name

%V

Vary Header

%x

Connection Header

%Z

Server Header