Skip to content

Commit

Permalink
优化内核包打印提示
Browse files Browse the repository at this point in the history
  • Loading branch information
noear committed Oct 12, 2023
1 parent e5b6922 commit 8c20d02
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion solon/src/main/java/org/noear/solon/SolonApp.java
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ public void tryHandle(Context x) {
ex = Utils.throwableUnwrap(ex);

//推送异常事件 //todo: Action -> Gateway? -> RouterHandler -> SolonApp!
LogUtil.global().warn(ex.getMessage(), ex);
LogUtil.global().warn("SolonApp tryHandle failed!", ex);

//如果未处理,尝试处理
if (x.getHandled() == false) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public static void publishTry(Object event) {
publish0(event);
} catch (Throwable e) {
//不再转发异常,免得死循环
LogUtil.global().warn(e.getMessage(), e);
LogUtil.global().warn("EventBus publishTry failed!", e);
}
}
}
Expand Down
8 changes: 4 additions & 4 deletions solon/src/main/java/org/noear/solon/core/handle/Action.java
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public Action(BeanWrap bWrap, HandlerAide bAide, Method method, Mapping mapping,

method.setAccessible(true);

if(NativeDetector.isAotRuntime()){
if (NativeDetector.isAotRuntime()) {
bWrap.context().methodGet(method);
}

Expand Down Expand Up @@ -311,7 +311,7 @@ protected void invoke0(Context c, Object obj) throws Throwable {
}
}

private void bindPathVarDo(Context c) throws Throwable{
private void bindPathVarDo(Context c) throws Throwable {
if (pathKeysAnalyzer != null) {
Matcher pm = pathKeysAnalyzer.matcher(c.pathNew());
if (pm.find()) {
Expand Down Expand Up @@ -356,8 +356,8 @@ protected void renderDo(Object obj, Context c) throws Throwable {
if (obj instanceof Throwable) {
if (c.remoting()) {
//尝试推送异常,不然没机会记录;也可对后继做控制
Throwable objE = (Throwable)obj;
LogUtil.global().warn(objE.getMessage(), objE);
Throwable objE = (Throwable) obj;
LogUtil.global().warn("Action remoting handle failed: " + c.pathNew(), objE);

if (c.getRendered() == false) {
c.render(obj);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ public void render(Object obj, Context c) throws Throwable {
if (c.remoting()) {
//尝试推送异常,不然没机会记录;也可对后继做控制
Throwable objE = (Throwable)obj;
LogUtil.global().warn(objE.getMessage(), objE);
LogUtil.global().warn("Gateway remoting handle failed!", objE);

if (c.getRendered() == false) {
c.render(obj);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public void onOpen(Session session) {
try {
session.close();
} catch (IOException e) {
LogUtil.global().warn(e.getMessage(), e);
LogUtil.global().warn("ContextPathListener onOpen failed!", e);
}
}
}
Expand Down

0 comments on commit 8c20d02

Please sign in to comment.