logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c...@apache.org
Subject cvs commit: logging-log4j/src/java/org/apache/log4j/rule RuleTest.java
Date Wed, 12 May 2004 17:00:09 GMT
ceki        2004/05/12 10:00:09

  Modified:    src/java/org/apache/log4j/chainsaw Generator.java
               src/java/org/apache/log4j/rule RuleTest.java
  Log:
  Changes to address deprecation warnings about the LoggingEvent constructor.
  
  Revision  Changes    Path
  1.9       +2 -4      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.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- Generator.java	27 Feb 2004 16:47:29 -0000	1.8
  +++ Generator.java	12 May 2004 17:00:09 -0000	1.9
  @@ -50,10 +50,8 @@
   
     private LoggingEvent createEvent(
       Level level, Logger logger, String msg, Throwable t) {
  -    LoggingEvent e =
  -      new LoggingEvent(
  -        logger.getClass().getName(), logger, System.currentTimeMillis(), level,
  -        msg, t);
  +    LoggingEvent e = new LoggingEvent(
  +        logger.getClass().getName(), logger, level, msg, t);
       e.setProperty(Constants.APPLICATION_KEY, getName());
       e.setProperty(Constants.HOSTNAME_KEY, "localhost");
   
  
  
  
  1.7       +4 -4      logging-log4j/src/java/org/apache/log4j/rule/RuleTest.java
  
  Index: RuleTest.java
  ===================================================================
  RCS file: /home/cvs/logging-log4j/src/java/org/apache/log4j/rule/RuleTest.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- RuleTest.java	12 May 2004 15:39:04 -0000	1.6
  +++ RuleTest.java	12 May 2004 17:00:09 -0000	1.7
  @@ -66,25 +66,25 @@
       eventList.add(
         new LoggingEvent(
           "org.apache.log4j.chainsaw", Logger.getLogger("logger1"),
  -        System.currentTimeMillis(), Level.DEBUG, "message1",
  +        Level.DEBUG, "message1",
           new Exception("test")));
       MDC.put("entry2", "test1");
       eventList.add(
         new LoggingEvent(
           "org.apache.log4j.chainsaw", Logger.getLogger("logger2"),
  -        System.currentTimeMillis(), Level.DEBUG, "message2",
  +        Level.DEBUG, "message2",
           new Exception("test2")));
       eventList.add(
         new LoggingEvent(
           "org.apache.log4j.net", Logger.getLogger("logger3"),
  -        System.currentTimeMillis(), Level.DEBUG, "message3",
  +        Level.DEBUG, "message3",
           new Exception("test3")));
   
       MDC.put("test", "234");
       eventList.add(
         new LoggingEvent(
           "org.apache.log4j.chainsaw", Logger.getLogger("logger4"),
  -        System.currentTimeMillis(), Level.WARN, "message4",
  +        Level.WARN, "message4",
           new Exception("test4")));
   
       Iterator iter = eventList.iterator();
  
  
  

---------------------------------------------------------------------
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