diff options
| author | Jonathan Bauer | 2014-09-22 16:55:49 +0200 |
|---|---|---|
| committer | Jonathan Bauer | 2014-09-22 16:55:49 +0200 |
| commit | 8379b2e4a5dd76fcbd344b7a152dc14629f64ae9 (patch) | |
| tree | 3b5082edd282f0143b5ea67ebf3f0956b8eed814 /dozentenmodul/src/main/java/thrift/MasterThriftConnection.java | |
| parent | [client] NEW: Logging mechanisms for the client (diff) | |
| download | tutor-module-8379b2e4a5dd76fcbd344b7a152dc14629f64ae9.tar.gz tutor-module-8379b2e4a5dd76fcbd344b7a152dc14629f64ae9.tar.xz tutor-module-8379b2e4a5dd76fcbd344b7a152dc14629f64ae9.zip | |
[client] do commit the changes :)
Diffstat (limited to 'dozentenmodul/src/main/java/thrift/MasterThriftConnection.java')
| -rw-r--r-- | dozentenmodul/src/main/java/thrift/MasterThriftConnection.java | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/dozentenmodul/src/main/java/thrift/MasterThriftConnection.java b/dozentenmodul/src/main/java/thrift/MasterThriftConnection.java index eec1d785..7c1259f9 100644 --- a/dozentenmodul/src/main/java/thrift/MasterThriftConnection.java +++ b/dozentenmodul/src/main/java/thrift/MasterThriftConnection.java @@ -1,5 +1,6 @@ package thrift; +import org.apache.log4j.Logger; import org.apache.thrift.protocol.TBinaryProtocol; import org.apache.thrift.protocol.TProtocol; import org.apache.thrift.transport.TFramedTransport; @@ -10,6 +11,8 @@ import org.openslx.imagemaster.thrift.iface.ImageServer.Client; public class MasterThriftConnection { + private final static Logger LOGGER = Logger.getLogger(MasterThriftConnection.class); + public static final String MASTERSERVER_IP = "132.230.4.16"; public static final int MASTERSERVER_PORT = 9090; public static final int MASTERSERVER_TIMEOUT_MS = 6000; @@ -22,13 +25,13 @@ public class MasterThriftConnection { try { transport.open(); } catch (TTransportException e) { - System.out.println("Keine Verbindung möglich!"); + LOGGER.error("Keine Verbindung möglich!"); return null; } final TProtocol protocol = new TBinaryProtocol(transport); final Client client = new Client(protocol); - System.out.println("Masterserver erreichbar."); + LOGGER.info("Masterserver '" + MASTERSERVER_IP + "' erreichbar."); return client; } |
