Reputation: 241
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?
Upvotes: 1
Views: 1469
Reputation: 1467
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.
Upvotes: 1
Reputation: 191
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
Upvotes: 2