karaf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ff...@apache.org
Subject svn commit: r1484646 - /karaf/branches/karaf-2.3.x/shell/log/src/main/java/org/apache/karaf/shell/log/DisplayLog.java
Date Tue, 21 May 2013 02:45:42 GMT
Author: ffang
Date: Tue May 21 02:45:41 2013
New Revision: 1484646

URL: http://svn.apache.org/r1484646
Log:
[KARAF-1973]NullPointerException when performing log:clear then log:tail in somecase

Modified:
    karaf/branches/karaf-2.3.x/shell/log/src/main/java/org/apache/karaf/shell/log/DisplayLog.java

Modified: karaf/branches/karaf-2.3.x/shell/log/src/main/java/org/apache/karaf/shell/log/DisplayLog.java
URL: http://svn.apache.org/viewvc/karaf/branches/karaf-2.3.x/shell/log/src/main/java/org/apache/karaf/shell/log/DisplayLog.java?rev=1484646&r1=1484645&r2=1484646&view=diff
==============================================================================
--- karaf/branches/karaf-2.3.x/shell/log/src/main/java/org/apache/karaf/shell/log/DisplayLog.java
(original)
+++ karaf/branches/karaf-2.3.x/shell/log/src/main/java/org/apache/karaf/shell/log/DisplayLog.java
Tue May 21 02:45:41 2013
@@ -168,7 +168,7 @@ public class DisplayLog extends OsgiComm
 
     private String getColor(PaxLoggingEvent event) {
         String color = null;
-        if (!noColor) {
+        if (!noColor && event != null && event.getLevel() != null &&
event.getLevel().toString() != null) {
             String lvl = event.getLevel().toString().toLowerCase();
             if (FATAL.equals(lvl)) {
                 color = fatalColor;



Mime
View raw message