diff --git a/ahc/pom.xml b/ahc/pom.xml index 48786f0..9b636a6 100644 --- a/ahc/pom.xml +++ b/ahc/pom.xml @@ -47,6 +47,12 @@ json 20211205 + + + org.apache.logging.log4j + log4j-slf4j-impl + 2.17.1 + org.dedriver ddp diff --git a/ahc/src/main/java/de/swingbe/ahc/Main.java b/ahc/src/main/java/de/swingbe/ahc/Main.java index d6576e9..0c13487 100644 --- a/ahc/src/main/java/de/swingbe/ahc/Main.java +++ b/ahc/src/main/java/de/swingbe/ahc/Main.java @@ -3,9 +3,14 @@ package de.swingbe.ahc; import org.dedriver.TxFactory; import org.dedriver.model.Adr; import org.dedriver.model.Msg; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public class Main { + + private final static Logger LOG = LoggerFactory.getLogger(Main.class); + /** * static String URL = "http://83.223.94.182"; */ @@ -17,10 +22,14 @@ public class Main { static String ROUTE = "/postdata"; public static void main(String[] args) { - System.out.println("Hello world!"); - TxFactory.createTx().send(new Msg("uuuid", "87.263783", "52.9019052", - "1642802000000", "alias", "0"), new Adr(PORT, ROUTE, URL)); - System.out.println("Done!"); + LOG.debug("Hello world!"); + Msg msg = new Msg("uuuid", "87.263783", "52.9019052", + "1642802000000", "alias", "0"); + LOG.debug("msg: " + msg); + Adr adr = new Adr(PORT, ROUTE, URL); + LOG.debug("adr: " + adr); + TxFactory.createTx().send(msg, adr); + LOG.debug("Done!"); } } \ No newline at end of file