diff flys-client/src/main/java/de/intevation/flys/client/server/MapOutputServiceImpl.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 4c65c5b60a86
children ec0c81f2c7a4
line wrap: on
line diff
--- a/flys-client/src/main/java/de/intevation/flys/client/server/MapOutputServiceImpl.java	Tue Oct 25 11:07:14 2011 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/server/MapOutputServiceImpl.java	Tue Oct 25 12:31:15 2011 +0000
@@ -5,6 +5,8 @@
 
 import org.w3c.dom.Document;
 
+import org.apache.log4j.Logger;
+
 import com.google.gwt.user.server.rpc.RemoteServiceServlet;
 
 import de.intevation.artifacts.common.utils.ClientProtocolUtils;
@@ -25,10 +27,14 @@
 implements   MapOutputService
 {
 
+    private static final Logger logger =
+        Logger.getLogger(MapOutputServiceImpl.class);
+
+
     public void doOut(Collection collection, String serverUrl)
     throws ServerException
     {
-        System.out.println("MapOutputServiceImpl.doGet");
+        logger.info("MapOutputServiceImpl.doOut");
 
         String uuid = collection.identifier();
 
@@ -41,15 +47,15 @@
 
             Document response = XMLUtils.parseDocument(is);
 
+            logger.debug(XMLUtils.toString(response));
+
             // TODO parse response document and return a MapConfig object
         }
         catch (ConnectionException e) {
-            e.printStackTrace();
-            System.err.println(e.getMessage());
+            logger.error(e, e);
         }
         catch (IOException ioe) {
-            ioe.printStackTrace();
-            System.err.println(ioe.getMessage());
+            logger.error(ioe, ioe);
         }
     }
 }

http://dive4elements.wald.intevation.org