日志打印内容调整

This commit is contained in:
fengjunfeng
2022-01-07 13:53:41 +08:00
parent c1fba57920
commit f9f2c3069f

View File

@@ -101,13 +101,13 @@ public class HaspUtil {
Hasp hasp = new Hasp(featureId);
hasp.login(vendorCode);
int status = hasp.getLastError();
log.info("license status: {}", status);
log.info("query license status: {}", status);
if(status == HaspStatus.HASP_STATUS_OK) {
String licenseInfo = hasp.getSessionInfo(LICENSE_STATUS);
status = hasp.getLastError();
log.info("license status: {}", status);
// log.info("license status: {}", status);
if (status != HaspStatus.HASP_STATUS_OK) {
log.error("Error: updateLicense Fails with status code :{}",status);
}
return licenseInfo;
}else if (status == HaspStatus.HASP_FEATURE_EXPIRED){
@@ -133,7 +133,7 @@ public class HaspUtil {
Hasp hasp = new Hasp(Hasp.HASP_DEFAULT_FID);
hasp.update(v2c);
int status = hasp.getLastError();
log.info("license status: {}", status);
log.info("updateLicense license status: {}", status);
if (status != HaspStatus.HASP_STATUS_OK) {
log.error("Error: updateLicense Fails with status code :{}",status);
}
@@ -151,21 +151,22 @@ public class HaspUtil {
Hasp hasp = new Hasp(featureId);
hasp.login(vendorCode);
int status = hasp.getLastError();
log.info("license status: {}", status);
// log.info("license status: {}", status);
if(status == HaspStatus.HASP_STATUS_OK) {
//如果已经安装过license ,读取指纹和 hasp id
String licenseInfo = hasp.getSessionInfo(KEY_C2V_FORMAT);
// String licenseInfo = hasp.getInfo(KEY_SCOPE,KEY_C2V_FORMAT,vendorCode);
status = hasp.getLastError();
log.info("license status: {}", status);
log.info("getLicense c2v license status: {}", status);
if (status != HaspStatus.HASP_STATUS_OK) {
log.error("Error: updateLicense Fails with status code :{}",status);
log.error("Error: Download Fails with status code :{}",status);
}
return licenseInfo;
}else {
hasp = new Hasp(featureId);
String infos = hasp.getInfo(KEY_SCOPE, KEY_VIEW, vendorCode);
status = hasp.getLastError();
log.info("license status: {}", status);
log.info("getLicense c2v license status: {}", status);
if(status != HaspStatus.HASP_STATUS_OK) {
log.error("Error: getLicense c2v Fails with status code :{}",status);
throw new RuntimeException();
@@ -178,7 +179,7 @@ public class HaspUtil {
Hasp hasp = new Hasp(fetureId);
hasp.login(vendorCode);
int status = hasp.getLastError();
log.info("license status: {}", status);
log.info("verify license status: {}", status);
if(status != HaspStatus.HASP_STATUS_OK) {
log.error("Error: license login Fails with status code :{}",status);
}