We have a JAVA/J2EE application. We need to configure audit trail,logs in JBOSS EAP Can someone help on this? AND also what should be the format?
2 Answers
This depends on what your 'Audit Logs' should contain. EAP contains a rich logging feature--you can configure the level of logging you'd like and specify which classes should log at which level. (This allows you to manage the amount of logging that you produce.) Almost any worthwhile JBoss book will have a section on this, it's still too broad of a question to answer here. Good luck, Rick

- 191
- 5
-
If you need an example of access (GET, POST) logging, similar to tomcats access log, I just got that working and can provide an example! – JGlass Apr 09 '18 at 15:34
-
@JGlass , thanks yes need to access(GET, POST) logging . Could you please provide example and configuration – Giggs Apr 11 '18 at 06:59
-
@JGlass Can you please provide an example – Giggs Apr 13 '18 at 10:57
-
I'm confused as the examples are below? – JGlass Apr 13 '18 at 13:55
This page logging requests with undertow has some very good information - unfortunately none of it worked for me except for the example starting with "If you’re looking for something like the access log from Apache HTTP Server" whis is basically:
<access-log use-server-log="true" pattern="%h %t "%r" %s "%{i,User-Agent}""/>
Note, as indicated in the section, it does user the server.log. If use-server-log
is set to false it will log to an access log file.
The above however, doesn't really help when you need to see the actual POST data being sent, for example the SOAP XML in a web service API call. I needed to troubleshoot both incoming and outgoing POSTs as well as POST responses so I used this:
<system-properties>
<property name="com.sun.xml.ws.transport.http.HttpAdapter.dump" value="true"/>
</system-properties>
The only bad thing with the above is that it logs both requests and responses however thats what I actually needed.
This SO post tracing xml request responses with jax ws has wuite a few other examples especially some with more granularity.

- 1,427
- 2
- 12
- 26
-
Thanks giggs for accepting my answer, I take it, it helped you out. Good Job! – JGlass Apr 12 '18 at 14:07