Skip to content

Commit

Permalink
优化 system.err.printlin 输出
Browse files Browse the repository at this point in the history
  • Loading branch information
kxlv2000 committed May 19, 2021
1 parent a719ceb commit 204ffe5
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 3 deletions.
19 changes: 19 additions & 0 deletions APIJSONORM/src/main/java/apijson/Log.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,25 @@ public static void d(String TAG, String msg) {
}
}

/**
* Forced debug
* @param TAG tag
* @param msg debug messages
*/
public static void fd(String TAG, String msg) {
System.err.println(TAG + ".DEBUG: " + msg);
}

/**
* Generate separation line
* @param pre prefix
* @param symbol used for generating separation line
* @param post postfix
*/
public static void sl(String pre,char symbol ,String post) {
System.err.println(pre+new String(new char[48]).replace('\u0000', symbol)+post);
}

/**
* @param TAG
* @param msg
Expand Down
6 changes: 3 additions & 3 deletions APIJSONORM/src/main/java/apijson/orm/AbstractParser.java
Original file line number Diff line number Diff line change
Expand Up @@ -52,19 +52,19 @@ public abstract class AbstractParser<T> implements Parser<T>, ParserCreator<T>,
* 可以通过切换该变量来控制是否打印关键的接口请求内容。保守起见,该值默认为false。
* 与 {@link Log#DEBUG} 任何一个为 true 都会打印关键的接口请求内容。
*/
public static boolean IS_PRINT_REQUEST_STRING_LOG = true;
public static boolean IS_PRINT_REQUEST_STRING_LOG = false;

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

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


/**
Expand Down

0 comments on commit 204ffe5

Please sign in to comment.