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 07:59:25 UTC
[6/6] karaf git commit: [KARAF-5266] Limit log entries displayed on
tail to 50 by default
[KARAF-5266] Limit log entries displayed on tail to 50 by default
Project: http://git-wip-us.apache.org/repos/asf/karaf/repo
Commit: http://git-wip-us.apache.org/repos/asf/karaf/commit/5e2f07e4
Tree: http://git-wip-us.apache.org/repos/asf/karaf/tree/5e2f07e4
Diff: http://git-wip-us.apache.org/repos/asf/karaf/diff/5e2f07e4
Branch: refs/heads/karaf-4.1.x
Commit: 5e2f07e442939e667a2653cc10ce3d6834899360
Parents: 29780f2
Author: Christian Schneider <ch...@die-schneider.net>
Authored: Sun Jul 30 16:49:16 2017 +0200
Committer: Christian Schneider <ch...@die-schneider.net>
Committed: Mon Jul 31 09:26:52 2017 +0200
----------------------------------------------------------------------
log/src/main/java/org/apache/karaf/log/command/LogTail.java | 3 +++
1 file changed, 3 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/karaf/blob/5e2f07e4/log/src/main/java/org/apache/karaf/log/command/LogTail.java
----------------------------------------------------------------------
diff --git a/log/src/main/java/org/apache/karaf/log/command/LogTail.java b/log/src/main/java/org/apache/karaf/log/command/LogTail.java
index d43b639..dc67e26 100644
--- a/log/src/main/java/org/apache/karaf/log/command/LogTail.java
+++ b/log/src/main/java/org/apache/karaf/log/command/LogTail.java
@@ -40,6 +40,9 @@ public class LogTail extends DisplayLog {
@Override
public Object execute() throws Exception {
+ if (entries == 0) {
+ entries = 50;
+ }
int minLevel = getMinLevel(level);
// Do not use System.out as it may write to the wrong console depending on the thread that calls our log handler
PrintStream out = session.getConsole();