Changes
This commit is contained in:
@@ -4,8 +4,8 @@ import com.sunyard.proto.Util;
|
||||
import com.sunyard.sge.database.*;
|
||||
import com.sunyard.sge.database.Consts;
|
||||
import com.sunyard.sge.log.LogFactory;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.junit.Assert;
|
||||
import org.slf4j.Logger;
|
||||
|
||||
import java.nio.ByteBuffer;
|
||||
import java.util.ArrayList;
|
||||
@@ -16,7 +16,7 @@ public class Sample
|
||||
public static void main(String[] args) {
|
||||
|
||||
// 路径要以 / 或 \\ 结尾表示目录
|
||||
SydApi.SYD_SetLogConfig("./logs/", Consts.LogLevelDebug );
|
||||
SydApi.SYD_SetLogConfig("./logs/",2);
|
||||
|
||||
Logger log = LogFactory.getLogger();
|
||||
log.info("start");
|
||||
|
||||
@@ -2,18 +2,29 @@ package test;
|
||||
|
||||
import com.sunyard.sge.database.SydApi;
|
||||
import com.sunyard.sge.database.SydApiBuilder;
|
||||
import com.sunyard.sge.database.pool.HsmLinkInfo;
|
||||
import com.sunyard.sge.database.pool.SydApiPool;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.time.Duration;
|
||||
import java.time.Instant;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
/**
|
||||
* 功能确认
|
||||
*/
|
||||
public class FuncTest {
|
||||
|
||||
private SydApi api;
|
||||
|
||||
@Before
|
||||
public void init(){
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void sm3(){
|
||||
SydApiBuilder builder = new SydApiBuilder(
|
||||
new String[]{ "192.168.0.200" },
|
||||
new int[]{ 8889 },
|
||||
@@ -24,9 +35,4 @@ public class FuncTest {
|
||||
api = builder.build();
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void sm3(){
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,15 +1,22 @@
|
||||
package test;
|
||||
|
||||
import com.sunyard.sge.database.SydApi;
|
||||
import com.sunyard.sge.database.SydApi4Database;
|
||||
import com.sunyard.sge.log.LogFactory;
|
||||
import org.slf4j.Logger;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
|
||||
public class LogTest {
|
||||
public static void main(String[] args) {
|
||||
|
||||
Logger log = LogFactory.createLogger("./test-log/", 2);
|
||||
log.error("error");
|
||||
log.info("info");
|
||||
log.debug("debug");
|
||||
SydApi.SYD_SetLogConfig("./test-log/",11);
|
||||
// int[] a1 = {1,2,3};
|
||||
// Logger log = LogFactory.createLogger("./test-log/", 9);
|
||||
// log.error("error");
|
||||
// log.info(Arrays.toString(a1));
|
||||
// log.debug("debug");
|
||||
// System.out.println("发送数据");
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user