logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From carn...@apache.org
Subject svn commit: r360564 - in /logging/log4j/trunk: src/java/org/apache/log4j/ src/java/org/apache/log4j/db/ src/java/org/apache/log4j/net/ src/java/org/apache/log4j/varia/ tests/src/java/org/apache/log4j/ tests/src/java/org/apache/log4j/performance/
Date Sun, 01 Jan 2006 21:56:07 GMT
Author: carnold
Date: Sun Jan  1 13:56:00 2006
New Revision: 360564

URL: http://svn.apache.org/viewcvs?rev=360564&view=rev
Log:
Bug 35452: Remove setLoggerRepo, add requiresLayout to Appender

Modified:
    logging/log4j/trunk/src/java/org/apache/log4j/Appender.java
    logging/log4j/trunk/src/java/org/apache/log4j/DailyRollingFileAppender.java
    logging/log4j/trunk/src/java/org/apache/log4j/RollingFileAppender.java
    logging/log4j/trunk/src/java/org/apache/log4j/WriterAppender.java
    logging/log4j/trunk/src/java/org/apache/log4j/db/DBAppender.java
    logging/log4j/trunk/src/java/org/apache/log4j/net/JMSAppender.java
    logging/log4j/trunk/src/java/org/apache/log4j/net/MulticastAppender.java
    logging/log4j/trunk/src/java/org/apache/log4j/net/SocketAppender.java
    logging/log4j/trunk/src/java/org/apache/log4j/varia/ListAppender.java
    logging/log4j/trunk/src/java/org/apache/log4j/varia/ListModelAppender.java
    logging/log4j/trunk/src/java/org/apache/log4j/varia/NullAppender.java
    logging/log4j/trunk/src/java/org/apache/log4j/varia/SoundAppender.java
    logging/log4j/trunk/tests/src/java/org/apache/log4j/LoggerTest.java
    logging/log4j/trunk/tests/src/java/org/apache/log4j/performance/NullAppender.java

Modified: logging/log4j/trunk/src/java/org/apache/log4j/Appender.java
URL: http://svn.apache.org/viewcvs/logging/log4j/trunk/src/java/org/apache/log4j/Appender.java?rev=360564&r1=360563&r2=360564&view=diff
==============================================================================
--- logging/log4j/trunk/src/java/org/apache/log4j/Appender.java (original)
+++ logging/log4j/trunk/src/java/org/apache/log4j/Appender.java Sun Jan  1 13:56:00 2006
@@ -115,8 +115,21 @@
    */
   public void setName(String name);
   
+    /**
+       Configurators call this method to determine if the appender
+      requires a layout. If this method returns <code>true</code>,
+      meaning that layout is required, then the configurator will
+      configure an layout using the configuration information at its
+      disposal.  If this method returns <code>false</code>, meaning that
+      a layout is not required, then layout configuration will be
+      skipped even if there is available layout configuration
+      information at the disposal of the configurator..
 
+       <p>In the rather exceptional case, where the appender
+       implementation admits a layout but can also work without it, then
+       the appender should return <code>true</code>.
 
-  public void setLoggerRepository(LoggerRepository repository) throws IllegalStateException;
-  
+       @since 0.8.4 */
+    public
+    boolean requiresLayout();
 }

Modified: logging/log4j/trunk/src/java/org/apache/log4j/DailyRollingFileAppender.java
URL: http://svn.apache.org/viewcvs/logging/log4j/trunk/src/java/org/apache/log4j/DailyRollingFileAppender.java?rev=360564&r1=360563&r2=360564&view=diff
==============================================================================
--- logging/log4j/trunk/src/java/org/apache/log4j/DailyRollingFileAppender.java (original)
+++ logging/log4j/trunk/src/java/org/apache/log4j/DailyRollingFileAppender.java Sun Jan  1
13:56:00 2006
@@ -344,4 +344,13 @@
     ; //ignore
   }
 
+    /**
+     * Gets whether appender requires a layout.
+     * @return false
+     */
+  public boolean requiresLayout() {
+      return true;
+  }
+
+
 }

Modified: logging/log4j/trunk/src/java/org/apache/log4j/RollingFileAppender.java
URL: http://svn.apache.org/viewcvs/logging/log4j/trunk/src/java/org/apache/log4j/RollingFileAppender.java?rev=360564&r1=360563&r2=360564&view=diff
==============================================================================
--- logging/log4j/trunk/src/java/org/apache/log4j/RollingFileAppender.java (original)
+++ logging/log4j/trunk/src/java/org/apache/log4j/RollingFileAppender.java Sun Jan  1 13:56:00
2006
@@ -411,4 +411,13 @@
       ; //ignore
     }
 
+    /**
+     * Gets whether appender requires a layout.
+     * @return false
+     */
+  public boolean requiresLayout() {
+      return false;
+  }
+
+
 }

Modified: logging/log4j/trunk/src/java/org/apache/log4j/WriterAppender.java
URL: http://svn.apache.org/viewcvs/logging/log4j/trunk/src/java/org/apache/log4j/WriterAppender.java?rev=360564&r1=360563&r2=360564&view=diff
==============================================================================
--- logging/log4j/trunk/src/java/org/apache/log4j/WriterAppender.java (original)
+++ logging/log4j/trunk/src/java/org/apache/log4j/WriterAppender.java Sun Jan  1 13:56:00
2006
@@ -374,4 +374,13 @@
       }
     }
   }
+
+    /**
+     * Gets whether appender requires a layout.
+     * @return false
+     */
+  public boolean requiresLayout() {
+      return true;
+  }
+
 }

Modified: logging/log4j/trunk/src/java/org/apache/log4j/db/DBAppender.java
URL: http://svn.apache.org/viewcvs/logging/log4j/trunk/src/java/org/apache/log4j/db/DBAppender.java?rev=360564&r1=360563&r2=360564&view=diff
==============================================================================
--- logging/log4j/trunk/src/java/org/apache/log4j/db/DBAppender.java (original)
+++ logging/log4j/trunk/src/java/org/apache/log4j/db/DBAppender.java Sun Jan  1 13:56:00 2006
@@ -331,4 +331,13 @@
   public void setLocationInfo(boolean locationInfo) {
     this.locationInfo = locationInfo;
   }
+
+    /**
+     * Gets whether appender requires a layout.
+     * @return false
+     */
+  public boolean requiresLayout() {
+      return false;
+  }
+    
 }

Modified: logging/log4j/trunk/src/java/org/apache/log4j/net/JMSAppender.java
URL: http://svn.apache.org/viewcvs/logging/log4j/trunk/src/java/org/apache/log4j/net/JMSAppender.java?rev=360564&r1=360563&r2=360564&view=diff
==============================================================================
--- logging/log4j/trunk/src/java/org/apache/log4j/net/JMSAppender.java (original)
+++ logging/log4j/trunk/src/java/org/apache/log4j/net/JMSAppender.java Sun Jan  1 13:56:00
2006
@@ -419,4 +419,13 @@
   protected TopicPublisher  getTopicPublisher() {
     return topicPublisher;
   }
+
+    /**
+     * Gets whether appender requires a layout.
+     * @return false
+     */
+  public boolean requiresLayout() {
+      return false;
+  }
+
 }

Modified: logging/log4j/trunk/src/java/org/apache/log4j/net/MulticastAppender.java
URL: http://svn.apache.org/viewcvs/logging/log4j/trunk/src/java/org/apache/log4j/net/MulticastAppender.java?rev=360564&r1=360563&r2=360564&view=diff
==============================================================================
--- logging/log4j/trunk/src/java/org/apache/log4j/net/MulticastAppender.java (original)
+++ logging/log4j/trunk/src/java/org/apache/log4j/net/MulticastAppender.java Sun Jan  1 13:56:00
2006
@@ -298,4 +298,13 @@
     // TODO handle active/inactive
     return true;
   }
+
+    /**
+     * Gets whether appender requires a layout.
+     * @return false
+     */
+  public boolean requiresLayout() {
+      return true;
+  }
+
 }

Modified: logging/log4j/trunk/src/java/org/apache/log4j/net/SocketAppender.java
URL: http://svn.apache.org/viewcvs/logging/log4j/trunk/src/java/org/apache/log4j/net/SocketAppender.java?rev=360564&r1=360563&r2=360564&view=diff
==============================================================================
--- logging/log4j/trunk/src/java/org/apache/log4j/net/SocketAppender.java (original)
+++ logging/log4j/trunk/src/java/org/apache/log4j/net/SocketAppender.java Sun Jan  1 13:56:00
2006
@@ -432,4 +432,13 @@
        }
     */
   }
+
+    /**
+     * Gets whether appender requires a layout.
+     * @return false
+     */
+  public boolean requiresLayout() {
+      return false;
+  }
+
 }

Modified: logging/log4j/trunk/src/java/org/apache/log4j/varia/ListAppender.java
URL: http://svn.apache.org/viewcvs/logging/log4j/trunk/src/java/org/apache/log4j/varia/ListAppender.java?rev=360564&r1=360563&r2=360564&view=diff
==============================================================================
--- logging/log4j/trunk/src/java/org/apache/log4j/varia/ListAppender.java (original)
+++ logging/log4j/trunk/src/java/org/apache/log4j/varia/ListAppender.java Sun Jan  1 13:56:00
2006
@@ -93,4 +93,12 @@
       list.clear();
     }
   }
+
+    /**
+     * Gets whether appender requires a layout.
+     * @return false
+     */
+  public boolean requiresLayout() {
+      return false;
+  }
 }

Modified: logging/log4j/trunk/src/java/org/apache/log4j/varia/ListModelAppender.java
URL: http://svn.apache.org/viewcvs/logging/log4j/trunk/src/java/org/apache/log4j/varia/ListModelAppender.java?rev=360564&r1=360563&r2=360564&view=diff
==============================================================================
--- logging/log4j/trunk/src/java/org/apache/log4j/varia/ListModelAppender.java (original)
+++ logging/log4j/trunk/src/java/org/apache/log4j/varia/ListModelAppender.java Sun Jan  1
13:56:00 2006
@@ -69,4 +69,13 @@
   public void clearModel() {
     model.clear();
   }
+
+    /**
+     * Gets whether appender requires a layout.
+     * @return false
+     */
+  public boolean requiresLayout() {
+      return false;
+  }
+
 }

Modified: logging/log4j/trunk/src/java/org/apache/log4j/varia/NullAppender.java
URL: http://svn.apache.org/viewcvs/logging/log4j/trunk/src/java/org/apache/log4j/varia/NullAppender.java?rev=360564&r1=360563&r2=360564&view=diff
==============================================================================
--- logging/log4j/trunk/src/java/org/apache/log4j/varia/NullAppender.java (original)
+++ logging/log4j/trunk/src/java/org/apache/log4j/varia/NullAppender.java Sun Jan  1 13:56:00
2006
@@ -55,5 +55,13 @@
    * */
   protected void append(LoggingEvent event) {
   }
+    /**
+     * Gets whether appender requires a layout.
+     * @return false
+     */
+  public boolean requiresLayout() {
+      return false;
+  }
+
 
 }

Modified: logging/log4j/trunk/src/java/org/apache/log4j/varia/SoundAppender.java
URL: http://svn.apache.org/viewcvs/logging/log4j/trunk/src/java/org/apache/log4j/varia/SoundAppender.java?rev=360564&r1=360563&r2=360564&view=diff
==============================================================================
--- logging/log4j/trunk/src/java/org/apache/log4j/varia/SoundAppender.java (original)
+++ logging/log4j/trunk/src/java/org/apache/log4j/varia/SoundAppender.java Sun Jan  1 13:56:00
2006
@@ -99,4 +99,13 @@
 	public void close() {
 		//nothing to do
 	}
+
+    /**
+     * Gets whether appender requires a layout.
+     * @return false
+     */
+  public boolean requiresLayout() {
+      return false;
+  }
+
 }

Modified: logging/log4j/trunk/tests/src/java/org/apache/log4j/LoggerTest.java
URL: http://svn.apache.org/viewcvs/logging/log4j/trunk/tests/src/java/org/apache/log4j/LoggerTest.java?rev=360564&r1=360563&r2=360564&view=diff
==============================================================================
--- logging/log4j/trunk/tests/src/java/org/apache/log4j/LoggerTest.java (original)
+++ logging/log4j/trunk/tests/src/java/org/apache/log4j/LoggerTest.java Sun Jan  1 13:56:00
2006
@@ -434,6 +434,15 @@
     public void append(LoggingEvent event) {
       counter++;
     }
+
+      /**
+       * Gets whether appender requires a layout.
+       * @return false
+       */
+    public boolean requiresLayout() {
+        return false;
+    }
+
   }
 }
 

Modified: logging/log4j/trunk/tests/src/java/org/apache/log4j/performance/NullAppender.java
URL: http://svn.apache.org/viewcvs/logging/log4j/trunk/tests/src/java/org/apache/log4j/performance/NullAppender.java?rev=360564&r1=360563&r2=360564&view=diff
==============================================================================
--- logging/log4j/trunk/tests/src/java/org/apache/log4j/performance/NullAppender.java (original)
+++ logging/log4j/trunk/tests/src/java/org/apache/log4j/performance/NullAppender.java Sun
Jan  1 13:56:00 2006
@@ -55,4 +55,13 @@
 
   public void append(LoggingEvent event) {
   }
+
+    /**
+     * Gets whether appender requires a layout.
+     * @return false
+     */
+  public boolean requiresLayout() {
+      return false;
+  }
+
 }



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