01: /*
02: * Created on 29.07.2005
03: *
04: * To change the template for this generated file go to
05: * Window - Preferences - Java - Code Generation - Code and Comments
06: */
07: package de.schlund.pfixcore.webservice.fault;
08:
09: import org.apache.log4j.Logger;
10:
11: public class LoggingHandler extends FaultHandler {
12:
13: private static final long serialVersionUID = -5523320091746362278L;
14:
15: private Logger LOG = Logger.getLogger(getClass().getName());
16:
17: public void init() {
18:
19: }
20:
21: public void handleFault(Fault fault) {
22: LOG.error("Service name: " + fault.getServiceName());
23: LOG.error("Exception name: " + fault.getName());
24: LOG.error("Exception message: " + fault.getMessage());
25: LOG.error("Request message: " + fault.getRequestMessage());
26: LOG.error("Context: "
27: + (fault.getContext() == null ? "-" : fault
28: .getContext()));
29: LOG.error("Stacktrace: " + fault.getStackTrace());
30: }
31:
32: }
|