You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-cvs@jakarta.apache.org by ce...@apache.org on 2001/01/22 12:02:56 UTC

cvs commit: jakarta-log4j/org/apache/log4j/spi LoggingEvent.java

ceki        01/01/22 03:02:56

  Modified:    org/apache/log4j Category.java
               org/apache/log4j/spi LoggingEvent.java
  Log:
  Changed Category.forcedLog not to render message objects immediately.
  Changed LoggingEvent constructor to take a message Object instead of a message String.
  
  Revision  Changes    Path
  1.15      +3 -9      jakarta-log4j/org/apache/log4j/Category.java
  
  Index: Category.java
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/org/apache/log4j/Category.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- Category.java	2001/01/22 10:57:25	1.14
  +++ Category.java	2001/01/22 11:02:54	1.15
  @@ -437,17 +437,11 @@
   
   
     /**
  -     This method renders the <code>message</code> passed as a
  -     oaraneter and logs immediately without further checks.  */
  +     This method creates a new logging event and logs the event
  +     without further checks.  */
     protected
     void forcedLog(String fqn, Priority priority, Object message, Throwable t) {
  -    String s;
  -    if(message instanceof String) {
  -      s = (String) message;
  -    } else {
  -      s = hierarchy.rendererMap.findAndRender(message);
  -    }
  -    callAppenders(new LoggingEvent(fqn, this, priority, s, t));
  +    callAppenders(new LoggingEvent(fqn, this, priority, message, t));
     }
   
   
  
  
  
  1.6       +1 -1      jakarta-log4j/org/apache/log4j/spi/LoggingEvent.java
  
  Index: LoggingEvent.java
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j/org/apache/log4j/spi/LoggingEvent.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- LoggingEvent.java	2001/01/22 10:57:28	1.5
  +++ LoggingEvent.java	2001/01/22 11:02:55	1.6
  @@ -116,7 +116,7 @@
        @param message  The message of this event.
        @param throwable The throwable of this event.  */
     public LoggingEvent(String fqnOfCategoryClass, Category category, 
  -		      Priority priority, String message, Throwable throwable) {
  +		      Priority priority, Object message, Throwable throwable) {
       this.fqnOfCategoryClass = fqnOfCategoryClass;
       this.category = category;
       this.categoryName = category.getName();