diff flys-client/src/main/java/de/intevation/flys/client/server/RiverServiceImpl.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 924da6695800
children bc06a671ef60
line wrap: on
line diff
--- a/flys-client/src/main/java/de/intevation/flys/client/server/RiverServiceImpl.java	Tue Oct 25 11:07:14 2011 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/server/RiverServiceImpl.java	Tue Oct 25 12:31:15 2011 +0000
@@ -9,6 +9,8 @@
 import org.w3c.dom.NodeList;
 import org.w3c.dom.Node;
 
+import org.apache.log4j.Logger;
+
 import com.google.gwt.user.server.rpc.RemoteServiceServlet;
 
 import de.intevation.artifacts.common.ArtifactNamespaceContext;
@@ -34,6 +36,10 @@
 extends      RemoteServiceServlet
 implements   RiverService
 {
+    private static final Logger logger =
+        Logger.getLogger(RiverServiceImpl.class);
+
+
     /** The XPath string that points to the rivers in the resulting document.*/
     public static final String XPATH_RIVERS = "/art:rivers/art:river";
 
@@ -85,7 +91,7 @@
             return (River[]) theRivers.toArray(new River[count]);
         }
         catch (ConnectionException ce) {
-            System.err.println(ce.getLocalizedMessage());
+            logger.error(ce, ce);
         }
 
         throw new ServerException(ERROR_NO_RIVERS_FOUND);

http://dive4elements.wald.intevation.org