How to activate access logs in JBoss 7.1.1 AS or JBoss EAP 6.2

How to activate access logs in JBoss 7.1.1 AS or JBoss EAP 6.2

  
Hello,

During the troubleshooting of a support case, or for your interest, we may request that you turn on access logs on JBoss 7.1.1 AS or JBoss EAP 6.2. This post explains how this can be done.

1) Open standalone-outsystems.xml configuration file:

# source /etc/sysconfig/outsystems
# cd $JBOSS_HOME/standalone/configuration
# <favorite editor> standalone-outsystems.xml

2) Find the subsystem urn:jboss:domain:web:1.1 element (it's the one with the connectors) and under virtual-server add the following element:

                    <access-log pattern="%a %t %p %r %s %S %T %{OSSESSIONID}c %{SoapAction}i" rotate="true">
                        <directory path="." relative-to="jboss.server.log.dir" />
                    </access-log>

For example, the virtual-server of a default installation might become the following:

            <virtual-server name="default-host" enable-welcome-root="true">
                <alias name="localhost"/>
                <alias name="example.com"/>
                    <access-log pattern="%a %t %p %r %s %S %T %{OSSESSIONID}c %{SoapAction}i" rotate="true">
                        <directory path="." relative-to="jboss.server.log.dir" />
                    </access-log>
            </virtual-server>

3) Save the file
4) restart jboss

# service jboss-outsystems restart

From now on, your log directory $JBOSS_HOME/standalone/log will have access_log files for each day, where information about the requests made to the OutSystems Platform will be logged.

Best regards,
Ricardo Silva