### 1. 启用 `@GoEnableLogger` ### 2. 如何使用 方法上加入@GoLog注解 ``` @GoLog(print = true,format = true) @RequestMapping("/appUpdate") public BaseResult appUpdate(@Validated(value = AppVersionUpdateValid.class) ApIReqVO req) { SConfig setting = mSConfigRepository.get("appUpdate"); JSONObject jo = JSON.parseObject(setting.getV()); if (req.getVersionCode()>= setting.getCode()) { jo.put("update", "No"); } return R.succ(jo); } ``` print : 打印默认开启true format :格式化默认false, storage :存储默认false(需自行实现存储) ### 3.验证结果 @GoLog ``` [FBOOT][ INFO][05-31 17:48:06]-->[http-nio-9090-exec-4:692936][logAroundAspect(LoggerAspect.java:75)] | - | request start appUpdate 1590918676095 {"versionCode":"19121501"} [FBOOT][ INFO][05-31 17:48:06]-->[http-nio-9090-exec-4:692947][logAroundAspect(LoggerAspect.java:86)] | - | request end appUpdate 1590918676272 {"code":0,"msg":"操作成功","data":{"target_size":"345M","update":"No","constraint":false,"new_version":"1010043","apk_file_url":"xxx.apk","update_log":"优化:游戏引擎"},"success":true} 1ms ``` @GoLog(print = true,format = true) ``` [FBOOT][ INFO][05-31 17:48:06]-->[http-nio-9090-exec-4:692936][logAroundAspect(LoggerAspect.java:75)] | - | request start appUpdate 1590918486478 { "versionCode":"19121501" } [FBOOT][ INFO][05-31 17:48:06]-->[http-nio-9090-exec-4:692947][logAroundAspect(LoggerAspect.java:86)] | - | request end appUpdate 1590918486489 { "code":0, "msg":"操作成功", "data":{ "target_size":"345M", "update":"No", "constraint":false, "new_version":"1010043", "apk_file_url":"xxx.apk", "update_log":"优化:游戏引擎" }, "success":true } 1ms ```