去除所有的system.print, 优化日志显示
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
package com.genersoft.iot.vmp.gb28181.utils;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
/**
|
||||
* 数值格式判断和处理
|
||||
* @author lawrencehj
|
||||
@@ -7,6 +10,8 @@ package com.genersoft.iot.vmp.gb28181.utils;
|
||||
*/
|
||||
public class NumericUtil {
|
||||
|
||||
private static Logger logger = LoggerFactory.getLogger(NumericUtil.class);
|
||||
|
||||
/**
|
||||
* 判断是否Double格式
|
||||
* @param str
|
||||
@@ -14,11 +19,11 @@ public class NumericUtil {
|
||||
*/
|
||||
public static boolean isDouble(String str) {
|
||||
try {
|
||||
Double num2 = Double.valueOf(str);
|
||||
System.out.println(num2 + " is a valid numeric string!");
|
||||
Double num2 = Double.valueOf(str);
|
||||
logger.debug(num2 + " is a valid numeric string!");
|
||||
return true;
|
||||
} catch (Exception e) {
|
||||
System.out.println(str + " is an invalid numeric string!");
|
||||
logger.debug(str + " is an invalid numeric string!");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -31,10 +36,10 @@ public class NumericUtil {
|
||||
public static boolean isInteger(String str) {
|
||||
try {
|
||||
int num2 = Integer.valueOf(str);
|
||||
System.out.println(num2 + " is an integer!");
|
||||
logger.debug(num2 + " is an integer!");
|
||||
return true;
|
||||
} catch (Exception e) {
|
||||
System.out.println(str + " is not an integer!");
|
||||
logger.debug(str + " is not an integer!");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user