logging-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sde...@apache.org
Subject svn commit: r945521 - /logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/Generator.java
Date Tue, 18 May 2010 06:51:09 GMT
Author: sdeboy
Date: Tue May 18 06:51:08 2010
New Revision: 945521

URL: http://svn.apache.org/viewvc?rev=945521&view=rev
Log:
Updating Chainsaw tutorial event generator to only generate exceptions for fatal level (the
new 'exception exists' color rule OR'd with the error & fatal level color rule was causing
every row to be the same color, since all rows contained exceptions)

Modified:
    logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/Generator.java

Modified: logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/Generator.java
URL: http://svn.apache.org/viewvc/logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/Generator.java?rev=945521&r1=945520&r2=945521&view=diff
==============================================================================
--- logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/Generator.java (original)
+++ logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/Generator.java Tue May
18 06:51:08 2010
@@ -66,46 +66,40 @@ public class Generator extends Receiver 
     int i = 0;
 
     while (!shutdown) {
-     doPost(createEvent(Level.TRACE, logger1, "tracemsg" + i++, new Exception("someexception-"
+ baseString_)));
+     doPost(createEvent(Level.TRACE, logger1, "tracemsg" + i++, null));
      doPost(
         createEvent(
           Level.DEBUG, logger1,
           "debugmsg " + i++
           + " g dg sdfa sadf sdf safd fsda asfd sdfa sdaf asfd asdf fasd fasd adfs fasd adfs
fads afds afds afsd afsd afsd afsd afsd fasd asfd asfd afsd fasd afsd",
-          new Exception("someexception-" + baseString_)));
-     doPost(createEvent(Level.INFO, logger1, "infomsg " + i++, new Exception("someexception-"
+ baseString_)));
-     doPost(createEvent(Level.WARN, logger1, "warnmsg " + i++, new Exception("someexception-"
+ baseString_)));
-     doPost(createEvent(Level.ERROR, logger1, "errormsg " + i++, new Exception("someexception-"
+ baseString_)));
+          null));
+     doPost(createEvent(Level.INFO, logger1, "infomsg " + i++, null));
+     doPost(createEvent(Level.WARN, logger1, "warnmsg " + i++, null));
+     doPost(createEvent(Level.ERROR, logger1, "errormsg " + i++, null));
      doPost(createEvent(Level.FATAL, logger1, "fatalmsg " + i++, new Exception("someexception-"
+ baseString_)));
-     doPost(createEvent(Level.TRACE, logger2, "tracemsg" + i++, new Exception("someexception-"
+ baseString_)));
+     doPost(createEvent(Level.TRACE, logger2, "tracemsg" + i++, null));
      doPost(
         createEvent(
           Level.DEBUG, logger2,
           "debugmsg " + i++
           + " g dg sdfa sadf sdf safd fsda asfd sdfa sdaf asfd asdf fasd fasd adfs fasd adfs
fads afds afds afsd afsd afsd afsd afsd fasd asfd asfd afsd fasd afsd",
-          new Exception("someexception-" + baseString_)));
-     doPost(createEvent(Level.INFO, logger2, "infomsg " + i++, new Exception("someexception-"
+ baseString_)));
-     doPost(createEvent(Level.WARN, logger2, "warnmsg " + i++, new Exception("someexception-"
+ baseString_)));
-     doPost(createEvent(Level.ERROR, logger2, "errormsg " + i++, new Exception("someexception-"
+ baseString_)));
+          null));
+     doPost(createEvent(Level.INFO, logger2, "infomsg " + i++, null));
+     doPost(createEvent(Level.WARN, logger2, "warnmsg " + i++, null));
+     doPost(createEvent(Level.ERROR, logger2, "errormsg " + i++, null));
      doPost(createEvent(Level.FATAL, logger2, "fatalmsg " + i++, new Exception("someexception-"
+ baseString_)));
-     doPost(createEvent(Level.TRACE, logger3, "tracemsg" + i++, new Exception("someexception-"
+ baseString_)));
+     doPost(createEvent(Level.TRACE, logger3, "tracemsg" + i++, null));
      doPost(
         createEvent(
           Level.DEBUG, logger3,
           "debugmsg " + i++
           + " g dg sdfa sadf sdf safd fsda asfd sdfa sdaf asfd asdf fasd fasd adfs fasd adfs
fads afds afds afsd afsd afsd afsd afsd fasd asfd asfd afsd fasd afsd",
-          new Exception("someexception-" + baseString_)));
-     doPost(createEvent(Level.INFO, logger3, "infomsg " + i++, new Exception("someexception-"
+ baseString_)));
-     doPost(createEvent(Level.WARN, logger3, "warnmsg " + i++, new Exception("someexception-"
+ baseString_)));
-     doPost(createEvent(Level.ERROR, logger3, "errormsg " + i++, new Exception("someexception-"
+ baseString_)));
+          null));
+     doPost(createEvent(Level.INFO, logger3, "infomsg " + i++, null));
+     doPost(createEvent(Level.WARN, logger3, "warnmsg " + i++, null));
+     doPost(createEvent(Level.ERROR, logger3, "errormsg " + i++, null));
      doPost(createEvent(Level.FATAL, logger3, "fatalmsg " + i++, new Exception("someexception-"
+ baseString_)));
-     
-     
-     
-     
-     
-     
-     
+
       try {
         Thread.sleep(1000);
       } catch (InterruptedException ie) {



Mime
View raw message