Enable Access Logs in jBoss Portal / EAP 6

In jBoss Portal 6.1 / jBoss EAP 6, the access logs can be enabled by adding element inside the virtual-server (web subsystem) in standalone.xml

<subsystem xmlns="urn:jboss:domain:web:1.2" default-virtual-server="default-host" native="false">
   <connector name="http" protocol="HTTP/1.1" scheme="http" socket-binding="http" />
   <virtual-server name="default-host" enable-welcome-root="true">
      <alias name="localhost" />
      <alias name="example.com" />
      <access-log pattern="%h %l %u %t %r %s %b %{Referer}i %{User-Agent}i %S %T" prefix="access_log_" />
   </virtual-server>
</subsystem>

Using CLI

/subsystem=web/virtual-server=default-host/access-log=configuration:add
/subsystem=web/virtual-server=default-host/access-log=configuration:write-attribute(name="pattern",value="%h %l %u %t \\"%r\\" %s %b %S %T")
:reload

Ref : access.redhat.com/solutions/185383