Mercurial > dive4elements > river
comparison flys-client/src/main/java/de/intevation/flys/client/server/ArtifactHelper.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 | ecd0243bc09e |
children | 436eec3be6ff |
comparison
equal
deleted
inserted
replaced
1366:d0eb2202ffbe | 1367:ab8eb2f544f2 |
---|---|
1 package de.intevation.flys.client.server; | 1 package de.intevation.flys.client.server; |
2 | 2 |
3 import org.w3c.dom.Document; | 3 import org.w3c.dom.Document; |
4 | |
5 import org.apache.log4j.Logger; | |
4 | 6 |
5 import java.util.ArrayList; | 7 import java.util.ArrayList; |
6 import java.util.List; | 8 import java.util.List; |
7 import java.util.Map; | 9 import java.util.Map; |
8 | 10 |
22 /** | 24 /** |
23 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a> | 25 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a> |
24 */ | 26 */ |
25 public class ArtifactHelper { | 27 public class ArtifactHelper { |
26 | 28 |
29 private static final Logger logger = Logger.getLogger(ArtifactHelper.class); | |
30 | |
31 | |
27 /** The error message key that is thrown if an error occured while artifact | 32 /** The error message key that is thrown if an error occured while artifact |
28 * creation.*/ | 33 * creation.*/ |
29 public static final String ERROR_CREATE_ARTIFACT = "error_create_artifact"; | 34 public static final String ERROR_CREATE_ARTIFACT = "error_create_artifact"; |
30 | 35 |
31 | 36 |
41 String locale, | 46 String locale, |
42 String factory, | 47 String factory, |
43 Recommendation recommendation) | 48 Recommendation recommendation) |
44 throws ServerException | 49 throws ServerException |
45 { | 50 { |
46 System.out.println("ArtifactHelper.create"); | 51 logger.debug("ArtifactHelper.create"); |
47 | 52 |
48 String uuid; | 53 String uuid; |
49 String ids; | 54 String ids; |
50 CreationFilter filter; | 55 CreationFilter filter; |
51 | 56 |
67 | 72 |
68 try { | 73 try { |
69 return (Artifact) client.create(create, new FLYSArtifactCreator()); | 74 return (Artifact) client.create(create, new FLYSArtifactCreator()); |
70 } | 75 } |
71 catch (ConnectionException ce) { | 76 catch (ConnectionException ce) { |
72 System.err.println(ce.getLocalizedMessage()); | 77 logger.error(ce, ce); |
73 } | 78 } |
74 | 79 |
75 throw new ServerException(ERROR_CREATE_ARTIFACT); | 80 throw new ServerException(ERROR_CREATE_ARTIFACT); |
76 } | 81 } |
77 | 82 |