karaf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbono...@apache.org
Subject karaf git commit: [KARAF-5182] Handle ALL keyword in log:get command
Date Thu, 08 Jun 2017 13:20:47 GMT
Repository: karaf
Updated Branches:
  refs/heads/karaf-4.1.x e260b8c83 -> 0ab38e766


[KARAF-5182] Handle ALL keyword in log:get command


Project: http://git-wip-us.apache.org/repos/asf/karaf/repo
Commit: http://git-wip-us.apache.org/repos/asf/karaf/commit/0ab38e76
Tree: http://git-wip-us.apache.org/repos/asf/karaf/tree/0ab38e76
Diff: http://git-wip-us.apache.org/repos/asf/karaf/diff/0ab38e76

Branch: refs/heads/karaf-4.1.x
Commit: 0ab38e76615978546a3bba239fd379a9944c396a
Parents: e260b8c
Author: Jean-Baptiste Onofré <jbonofre@apache.org>
Authored: Thu Jun 8 15:04:27 2017 +0200
Committer: Jean-Baptiste Onofré <jbonofre@apache.org>
Committed: Thu Jun 8 15:14:51 2017 +0200

----------------------------------------------------------------------
 .../main/java/org/apache/karaf/log/command/GetLogLevel.java    | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/karaf/blob/0ab38e76/log/src/main/java/org/apache/karaf/log/command/GetLogLevel.java
----------------------------------------------------------------------
diff --git a/log/src/main/java/org/apache/karaf/log/command/GetLogLevel.java b/log/src/main/java/org/apache/karaf/log/command/GetLogLevel.java
index f9b0cf7..3287f7e 100644
--- a/log/src/main/java/org/apache/karaf/log/command/GetLogLevel.java
+++ b/log/src/main/java/org/apache/karaf/log/command/GetLogLevel.java
@@ -45,16 +45,14 @@ public class GetLogLevel implements Action {
 
     @Override
     public Object execute() throws Exception {
-        if (logger == null) {
+        if (logger == null || logger.equals("ALL")) {
             Map<String, String> loggers = logService.getLevel("ALL");
             ShellTable table = new ShellTable();
             table.column("Logger");
             table.column("Level");
             loggers.forEach((n, l) -> table.addRow().addContent(n, l));
             table.print(System.out, !noFormat);
-        }
-        else
-        {
+        } else {
             Map<String, String> loggers = logService.getLevel( logger );
             String level = loggers.get( logger );
             System.out.println( level );


Mime
View raw message