Skip to content

Commit

Permalink
日志记录优化
Browse files Browse the repository at this point in the history
  • Loading branch information
xenv committed Feb 12, 2019
1 parent 21d0076 commit fcea91d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>ma.luan</groupId>
<artifactId>yiyan</artifactId>
<version>1.4</version>
<version>1.4.1</version>

<properties>
<java.version>1.8</java.version>
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/ma/luan/yiyan/MainVerticle.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public class MainVerticle extends AbstractVerticle {
@Override
public void start(Future<Void> startFuture) {
// 配置 RuntimeError 错误记录
vertx.exceptionHandler(error -> log.error(error));
vertx.exceptionHandler(error -> log.error("未捕获的异常:", error));

// 顺序部署 Verticle
Future.<Void>succeededFuture()
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/ma/luan/yiyan/service/LogService.java
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ private void getHistoryFromRedis(Message<JsonObject> message) {
result.put("最近七天点击量", history.result());
message.reply(result);
} else {
log.error(v.cause());
log.error("日志获取异常", v.cause());
message.fail(500, v.cause().getMessage());
}
});
Expand Down

0 comments on commit fcea91d

Please sign in to comment.