I've build a jax-ws based web service containing several webmethodes.
I would like to use java.util.logging to log events to a file, using an external properties file.
In the client application, logging works fine.
How do I setup the WS to log to an external text file? Where do I configure the logger?
Do I have to setup the logger with every webmethode call?
The code of my client application
the properties file content
I'm using Glassfish as application server.
I've tried placing the code in a "static" block, but it doesn't work
You can initialize your LogManager in HTTP Servlet Context Listener.
So when ever, your application (JAX-WS Web Service) is loaded in Glassfish server, context is loaded and that's where contextInitialized() method is called.
posted 4 years ago
Thanks for your feedback. It works great.
For other people having the same problem, other useful info can be found on ...