How to configure logging in GlassFish for the WS-Policy implementation in WSIT II
In a previous blog entry, I described how to configure the logging level for the WSIT WS-Policy component in GlassFish v2 through the admin console. Thanks to Tom Amiro, I know now how to do the same by modifying the GlassFish configuration files. This may come in handy when you are just about to start the app server and don't want to wait until you can log into the admin console or when you are debugging an issue and need to have logging enabled right from the start.
Locate the domain.xml file for your domain. The file is stored in $AS_HOME/domains/yourdomain/config/domain.xml.
- Locate the
log-service element in domain.xml. It should look similarly to this:<log-service alarms="false" file="${com.sun.aas.instanceRoot}/logs/server.log"
log-rotation-limit-in-bytes="2000000" log-rotation-timelimit-in-minutes="0"
log-to-console="false" retain-error-statistics-for-hours="5" use-system-logging="false">
<module-log-levels admin="INFO" classloader="INFO" cmp="INFO" cmp-container="INFO"
configuration="INFO" connector="INFO" corba="INFO" deployment="INFO" ejb-container="INFO"
group-management-service="INFO" javamail="INFO" jaxr="INFO" jaxrpc="INFO" jdo="INFO"
jms="INFO" jta="INFO" jts="INFO" management-event="INFO" mdb-container="INFO" naming="INFO"
node-agent="INFO" resource-adapter="INFO" root="INFO" saaj="INFO" security="INFO"
self-management="INFO" server="INFO" synchronization="INFO" util="INFO" verifier="INFO"
web-container="INFO"/>
</log-service>
- Add the line
<property name="javax.enterprise.resource.webservices.jaxws.wspolicy" value="FINE"/>. The value may of course be any logging level you want to set. The final result should look like this:<log-service alarms="false" file="${com.sun.aas.instanceRoot}/logs/server.log"
log-rotation-limit-in-bytes="2000000" log-rotation-timelimit-in-minutes="0"
log-to-console="false" retain-error-statistics-for-hours="5" use-system-logging="false">
<module-log-levels admin="INFO" classloader="INFO" cmp="INFO" cmp-container="INFO"
configuration="INFO" connector="INFO" corba="INFO" deployment="INFO" ejb-container="INFO"
group-management-service="INFO" javamail="INFO" jaxr="INFO" jaxrpc="INFO" jdo="INFO"
jms="INFO" jta="INFO" jts="INFO" management-event="INFO" mdb-container="INFO" naming="INFO"
node-agent="INFO" resource-adapter="INFO" root="INFO" saaj="INFO" security="INFO"
self-management="INFO" server="INFO" synchronization="INFO" util="INFO" verifier="INFO"
web-container="INFO"/>
<property name="javax.enterprise.resource.webservices.jaxws.wspolicy" value="FINE"/>
</log-service>
Technorati:
WSIT WS-Policy GlassFish
Posted at
11:44AM Feb 06, 2007
by Fabian Ritzmann in Sun |