hugo-logging調(diào)試日志工具包
hugo 是注釋驅(qū)動(dòng)的方法,用來在調(diào)試的時(shí)候調(diào)用日志記錄。它用于打印函數(shù)信息及執(zhí)行時(shí)間的工具,僅在debug模式生效。
示例代碼:
@DebugLog
public String getName(String first, String last) {
SystemClock.sleep(15); // Don't ever really do this!
return first + " " + last;
}
輸出:
V/Example: ? getName(first="Jake", last="Wharton") V/Example: ? getName [16ms] = "Jake Wharton"
評(píng)論
圖片
表情
