Mercurial > dive4elements > river
comparison flys-client/src/main/java/de/intevation/flys/client/server/ReportServiceImpl.java @ 1367:ab8eb2f544f2
Replaced stdout and stderr logging with log4j loggers in server classes.
flys-client/trunk@3069 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Tue, 25 Oct 2011 12:31:15 +0000 |
parents | 84d3c5fde5bb |
children | bc06a671ef60 |
comparison
equal
deleted
inserted
replaced
1366:d0eb2202ffbe | 1367:ab8eb2f544f2 |
---|---|
4 import java.io.IOException; | 4 import java.io.IOException; |
5 | 5 |
6 import org.w3c.dom.Document; | 6 import org.w3c.dom.Document; |
7 import org.w3c.dom.Element; | 7 import org.w3c.dom.Element; |
8 import org.w3c.dom.NodeList; | 8 import org.w3c.dom.NodeList; |
9 | |
10 import org.apache.log4j.Logger; | |
9 | 11 |
10 import com.google.gwt.user.server.rpc.RemoteServiceServlet; | 12 import com.google.gwt.user.server.rpc.RemoteServiceServlet; |
11 | 13 |
12 import org.apache.commons.lang.StringEscapeUtils; | 14 import org.apache.commons.lang.StringEscapeUtils; |
13 | 15 |
21 | 23 |
22 public class ReportServiceImpl | 24 public class ReportServiceImpl |
23 extends RemoteServiceServlet | 25 extends RemoteServiceServlet |
24 implements ReportService | 26 implements ReportService |
25 { | 27 { |
28 private static final Logger logger = | |
29 Logger.getLogger(ReportServiceImpl.class); | |
30 | |
31 | |
26 @Override | 32 @Override |
27 public String report( | 33 public String report( |
28 String collectionId, | 34 String collectionId, |
29 String url, | 35 String url, |
30 String locale, | 36 String locale, |
31 String out | 37 String out |
32 ) { | 38 ) { |
33 System.err.println("report: " + collectionId + " " + out); | 39 logger.info("report: " + collectionId + " " + out); |
34 | 40 |
35 Document request = ClientProtocolUtils.newOutCollectionDocument( | 41 Document request = ClientProtocolUtils.newOutCollectionDocument( |
36 collectionId, | 42 collectionId, |
37 out, | 43 out, |
38 "report"); | 44 "report"); |
41 try { | 47 try { |
42 HttpClient client = new HttpClientImpl(url, locale); | 48 HttpClient client = new HttpClientImpl(url, locale); |
43 in = client.collectionOut(request, collectionId, out); | 49 in = client.collectionOut(request, collectionId, out); |
44 | 50 |
45 if (in == null) { | 51 if (in == null) { |
46 System.err.println("report: no report"); | 52 logger.debug("report: no report"); |
47 return null; | 53 return null; |
48 } | 54 } |
49 | 55 |
50 Document report = XMLUtils.parseDocument(in); | 56 Document report = XMLUtils.parseDocument(in); |
51 | 57 |