Adding HTTP Access Logging to Glassfish 3.0 Server

Recently I had the need to monitor the requests that were being sent to my Glassfish server. Here is the simple configuration change that needed to be done to the domain.xml file:

<config name="server-config">
<http-service enabled="true"></http-service>
<access-log format=" %auth-user-name% %datetime% %request% %status% %response.length% %header.referer%"></access-log>
<virtual-server id="server" log="/mnt/httpd/logs/access" listeners="http-listener-1"></virtual-server>
<virtual-server id="__asadmin" listeners="admin-listener"></virtual-server>

Sun's Documentation: Enabling Access Logging