You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@karaf.apache.org by cs...@apache.org on 2017/07/31 15:34:08 UTC
karaf git commit: [KARAF-5279] Only log InterruptedException on debug
level
Repository: karaf
Updated Branches:
refs/heads/master 09d4d1e68 -> f9e5308f3
[KARAF-5279] Only log InterruptedException on debug level
Project: http://git-wip-us.apache.org/repos/asf/karaf/repo
Commit: http://git-wip-us.apache.org/repos/asf/karaf/commit/f9e5308f
Tree: http://git-wip-us.apache.org/repos/asf/karaf/tree/f9e5308f
Diff: http://git-wip-us.apache.org/repos/asf/karaf/diff/f9e5308f
Branch: refs/heads/master
Commit: f9e5308f3cfe50453bdab321f405b253da330990
Parents: 09d4d1e
Author: Christian Schneider <ch...@die-schneider.net>
Authored: Mon Jul 31 17:30:08 2017 +0200
Committer: Christian Schneider <ch...@die-schneider.net>
Committed: Mon Jul 31 17:30:08 2017 +0200
----------------------------------------------------------------------
.../karaf/shell/impl/console/ConsoleSessionImpl.java | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/karaf/blob/f9e5308f/shell/core/src/main/java/org/apache/karaf/shell/impl/console/ConsoleSessionImpl.java
----------------------------------------------------------------------
diff --git a/shell/core/src/main/java/org/apache/karaf/shell/impl/console/ConsoleSessionImpl.java b/shell/core/src/main/java/org/apache/karaf/shell/impl/console/ConsoleSessionImpl.java
index 66802e4..de1474d 100644
--- a/shell/core/src/main/java/org/apache/karaf/shell/impl/console/ConsoleSessionImpl.java
+++ b/shell/core/src/main/java/org/apache/karaf/shell/impl/console/ConsoleSessionImpl.java
@@ -364,14 +364,10 @@ public class ConsoleSessionImpl implements Session {
if (result != null) {
session.getConsole().println(session.format(result, Converter.INSPECT));
}
+ } catch (InterruptedException e) {
+ LOGGER.debug("Console session is closed");
} catch (Throwable t) {
- if (!(command.endsWith("logout") && t instanceof InterruptedException)) {
- //command logout will interrupt this seesion thread, so this exception
- //is expected, don't need log it as a error message
- ShellUtil.logException(this, t);
- } else {
- LOGGER.debug("a console session is closed as the peer just logout");
- }
+ ShellUtil.logException(this, t);
}
}
close();