logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sde...@apache.org
Subject cvs commit: logging-log4j/src/java/org/apache/log4j/chainsaw Generator.java
Date Wed, 08 Dec 2004 09:17:42 GMT
sdeboy      2004/12/08 01:17:42

  Modified:    src/java/org/apache/log4j/chainsaw/icons
                        LevelIconFactory.java
               src/java/org/apache/log4j/chainsaw Generator.java
  Log:
  Using ERROR icon for fatal events
  Adding entries to generator
  
  Revision  Changes    Path
  1.6       +4 -2      logging-log4j/src/java/org/apache/log4j/chainsaw/icons/LevelIconFactory.java
  
  Index: LevelIconFactory.java
  ===================================================================
  RCS file: /home/cvs/logging-log4j/src/java/org/apache/log4j/chainsaw/icons/LevelIconFactory.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- LevelIconFactory.java	1 Dec 2004 07:58:07 -0000	1.5
  +++ LevelIconFactory.java	8 Dec 2004 09:17:41 -0000	1.6
  @@ -32,9 +32,10 @@
     private final Map iconMap = new HashMap();
   
     private LevelIconFactory() {
  +    //reuse ERROR icon for FATAL level
       String[] iconFileNames =
  -      new String[] { "Warn.gif", "Inform.gif", "Error.gif" };
  -    String[] iconLabels = new String[] { "WARN", "INFO", "ERROR" };
  +      new String[] { "Warn.gif", "Inform.gif", "Error.gif" , "Error.gif"};
  +    String[] iconLabels = new String[] { "WARN", "INFO", "ERROR", "FATAL" };
   
       for (int i = 0; i < iconLabels.length; i++) {
         URL resourceURL = UIManager.getLookAndFeel().getClass().getResource(
  @@ -58,6 +59,7 @@
             newWidth, newHeight, Image.SCALE_SMOOTH);
         iconMap.put(iconLabels[i], new ImageIcon(iconImage));
       }
  +    //reuse DEBUG icon for TRACE level
       iconMap.put("TRACE", ChainsawIcons.ICON_DEBUG);
       iconMap.put("DEBUG", ChainsawIcons.ICON_DEBUG);
     }
  
  
  
  1.11      +28 -9     logging-log4j/src/java/org/apache/log4j/chainsaw/Generator.java
  
  Index: Generator.java
  ===================================================================
  RCS file: /home/cvs/logging-log4j/src/java/org/apache/log4j/chainsaw/Generator.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- Generator.java	1 Dec 2004 07:58:07 -0000	1.10
  +++ Generator.java	8 Dec 2004 09:17:42 -0000	1.11
  @@ -72,20 +72,39 @@
             "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,logger3,  "warnmsg " + i++, 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_)));
  +     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.DEBUG, logger2,"debugmsg " + i++, new Exception("someexception-"
+ baseString_)));
  -     doPost(createEvent(Level.INFO, logger3,"infomsg " + i++, new Exception("someexception-"
+ baseString_)));
  -     doPost(createEvent(Level.WARN, logger1, "warnmsg " + i++, new Exception("someexception-"
+ baseString_)));
  +     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_)));
  +     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.DEBUG, logger3, "debugmsg " + i++, new Exception("someexception-"
+ baseString_)));
  -     doPost(createEvent(Level.INFO, logger1, "infomsg " + i++, new Exception("someexception-"
+ baseString_)));
  -     doPost(createEvent(Level.WARN, logger2, "warnmsg " + i++, new Exception("someexception-"
+ baseString_)));
  +     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_)));
  +     doPost(createEvent(Level.FATAL, logger3, "fatalmsg " + i++, new Exception("someexception-"
+ baseString_)));
  +     
  +     
  +     
  +     
  +     
  +     
  +     
         try {
           Thread.sleep(1000);
         } catch (InterruptedException ie) {
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org


Mime
View raw message