Skip to content

Commit 204ffe5

Browse files
committed
优化 system.err.printlin 输出
issue Tencent#232
1 parent a719ceb commit 204ffe5

File tree

2 files changed

+22
-3
lines changed

2 files changed

+22
-3
lines changed

APIJSONORM/src/main/java/apijson/Log.java

+19
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,25 @@ public static void d(String TAG, String msg) {
2222
}
2323
}
2424

25+
/**
26+
* Forced debug
27+
* @param TAG tag
28+
* @param msg debug messages
29+
*/
30+
public static void fd(String TAG, String msg) {
31+
System.err.println(TAG + ".DEBUG: " + msg);
32+
}
33+
34+
/**
35+
* Generate separation line
36+
* @param pre prefix
37+
* @param symbol used for generating separation line
38+
* @param post postfix
39+
*/
40+
public static void sl(String pre,char symbol ,String post) {
41+
System.err.println(pre+new String(new char[48]).replace('\u0000', symbol)+post);
42+
}
43+
2544
/**
2645
* @param TAG
2746
* @param msg

APIJSONORM/src/main/java/apijson/orm/AbstractParser.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -52,19 +52,19 @@ public abstract class AbstractParser<T> implements Parser<T>, ParserCreator<T>,
5252
* 可以通过切换该变量来控制是否打印关键的接口请求内容。保守起见,该值默认为false。
5353
* 与 {@link Log#DEBUG} 任何一个为 true 都会打印关键的接口请求内容。
5454
*/
55-
public static boolean IS_PRINT_REQUEST_STRING_LOG = true;
55+
public static boolean IS_PRINT_REQUEST_STRING_LOG = false;
5656

5757
/**
5858
* 打印大数据量日志的标识。线上环境比较敏感,可以通过切换该变量来控制异常栈抛出、错误日志打印。保守起见,该值默认为false。
5959
* 与 {@link Log#DEBUG} 任何一个为 true 都会打印关键的接口请求及响应信息。
6060
*/
61-
public static boolean IS_PRINT_BIG_LOG = true;
61+
public static boolean IS_PRINT_BIG_LOG = false;
6262

6363
/**
6464
* 可以通过切换该变量来控制是否打印关键的接口请求结束时间。保守起见,该值默认为false。
6565
* 与 {@link Log#DEBUG} 任何一个为 true 都会打印关键的接口请求结束时间。
6666
*/
67-
public static boolean IS_PRINT_REQUEST_ENDTIME_LOG = true;
67+
public static boolean IS_PRINT_REQUEST_ENDTIME_LOG = false;
6868

6969

7070
/**

0 commit comments

Comments
 (0)