Configuring JBoss EAP 7 to write an access log (e.g. like Apache webserver) is quite easy with the CLI:
/subsystem=undertow/server=default-server/host=default-host/setting=access-log:add
If you need any additional configuration, take a look at this: Wildfly 10.0.0.Final Model Reference.
For example, to change the prefix of the log’s file name:
/subsystem=undertow/server=default-server/host=default-host/setting=access-log:write-attribute(name=prefix, value="my_access")
Alternatively, you could change the configuration in the config XML (e.g. standalone.xml
):
<subsystem xmlns="urn:jboss:domain:undertow:3.1">
...
<server name="default-server">
...
<host name="default-host" alias="localhost">
...
<access-log prefix="my_access" />
...
</host>
</server>
...
</subsystem>
JBoss will now write every access to the application to accesslog
in the log directory (e.g. JBOSS_HOME\standalone\log
):
192.168.1.1 - - [23/Jun/2016:13:29:24 +0200] "GET /MyApp/MyPath/MyFile.xhtml HTTP/1.1" 200 5738