feat: add logging library
This commit is contained in:
parent
36f1c27f17
commit
c81976427b
|
@ -47,6 +47,12 @@
|
||||||
<artifactId>json</artifactId>
|
<artifactId>json</artifactId>
|
||||||
<version>20211205</version>
|
<version>20211205</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<!--required for Logger class-->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.logging.log4j</groupId>
|
||||||
|
<artifactId>log4j-slf4j-impl</artifactId>
|
||||||
|
<version>2.17.1</version>
|
||||||
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.dedriver</groupId>
|
<groupId>org.dedriver</groupId>
|
||||||
<artifactId>ddp</artifactId>
|
<artifactId>ddp</artifactId>
|
||||||
|
|
|
@ -3,9 +3,14 @@ package de.swingbe.ahc;
|
||||||
import org.dedriver.TxFactory;
|
import org.dedriver.TxFactory;
|
||||||
import org.dedriver.model.Adr;
|
import org.dedriver.model.Adr;
|
||||||
import org.dedriver.model.Msg;
|
import org.dedriver.model.Msg;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
public class Main {
|
public class Main {
|
||||||
|
|
||||||
|
|
||||||
|
private final static Logger LOG = LoggerFactory.getLogger(Main.class);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* static String URL = "http://83.223.94.182";
|
* static String URL = "http://83.223.94.182";
|
||||||
*/
|
*/
|
||||||
|
@ -17,10 +22,14 @@ public class Main {
|
||||||
static String ROUTE = "/postdata";
|
static String ROUTE = "/postdata";
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
System.out.println("Hello world!");
|
LOG.debug("Hello world!");
|
||||||
TxFactory.createTx().send(new Msg("uuuid", "87.263783", "52.9019052",
|
Msg msg = new Msg("uuuid", "87.263783", "52.9019052",
|
||||||
"1642802000000", "alias", "0"), new Adr(PORT, ROUTE, URL));
|
"1642802000000", "alias", "0");
|
||||||
System.out.println("Done!");
|
LOG.debug("msg: " + msg);
|
||||||
|
Adr adr = new Adr(PORT, ROUTE, URL);
|
||||||
|
LOG.debug("adr: " + adr);
|
||||||
|
TxFactory.createTx().send(msg, adr);
|
||||||
|
LOG.debug("Done!");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
Loading…
Reference in New Issue