[Master] Configuring Access Logs in Red Hat Middleware Products

Solution Verified - Updated -

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP)
  • Red Hat Enterprise Linux (RHEL)
  • Red Hat Software Collections (RHSCL)
  • Red Hat JBoss Web Server (JWS)
  • Red Hat JBoss Core Services (JBCS)
  • Apache HTTPD
  • Apache Tomcat
  • NGINX Web Server

Issue

  • How to enable friendly access log times in JBoss EAP?
  • How to enable friendly access log times in Apache HTTPD?
  • How to enable friendly access log times in Apache Tomcat?
  • How to enable friendly access log times in NGINX?

Resolution

The default access log timing in Apache HTTPD, Tomcat, and JBoss EAP are in milliseconds and are not conducive to quickly identifying high access times, or for easily tracing through the flow of a request from HTTPD to EAP using mod_jk, for example.

One approach that has worked well in modifying the default configuration is to add a Time Taken string to the log pattern followed by the request time in seconds and milliseconds.

As well as other information such as cookies, request headers, process ID, thread ID, etc. Each server has different configuration and arguments to do it and here is the list with solutions for each server and its version:

For EAP 4.x / 5.x

For EAP 6.x

For EAP 7.x

For Apache HTTPD

For NGINX

For Apache Tomcat

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Comments