Logging request headers

You can configure access log settings for HTTP endpoints in the logFormat attribute string of the httpAccessLogging element of the Liberty configuration.

An HTTP access log contains a record of all inbound client requests that are handled by HTTP endpoints.

For more information, see A launch icon to indicate a link opens a new tab or window. HTTP Access Logging in the Open Liberty documentation.

To see how request and response headers can be specified in the logFormat string, see A launch icon to indicate a link opens a new tab or window. HTTP access log format in the Open Liberty documentation.

Be aware that logging is initialized before the server.xml file is processed, so configuring logging through the server.xml file can result in early log entries that use a different log configuration from later ones. To avoid this problem, you can provide much of the logging configuration in the boostrap.properties file and sometimes by using environment variables. For more information, see A launch icon to indicate a link opens a new tab or window. Log and trace configuration.