[logback-dev] svn commit: r902 - in logback/trunk: logback-access/src/main/java/ch/qos/logback/access/net logback-classic/src/main/java/ch/qos/logback/classic/net logback-core/src/main/java/ch/qos/logback/core/rolling logback-examples/src/main/java/chapter4/mail

noreply.seb at qos.ch noreply.seb at qos.ch
Mon Nov 13 11:48:38 CET 2006


Author: seb
Date: Mon Nov 13 11:48:38 2006
New Revision: 902

Modified:
   logback/trunk/logback-access/src/main/java/ch/qos/logback/access/net/SMTPAppender.java
   logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/net/SMTPAppender.java
   logback/trunk/logback-core/src/main/java/ch/qos/logback/core/rolling/SizeBasedTriggeringPolicy.java
   logback/trunk/logback-core/src/main/java/ch/qos/logback/core/rolling/TimeBasedRollingPolicy.java
   logback/trunk/logback-core/src/main/java/ch/qos/logback/core/rolling/TriggeringPolicy.java
   logback/trunk/logback-examples/src/main/java/chapter4/mail/CounterBasedTP.java

Log:
changed TriggeringPolicy's file parameter to activeFile

Modified: logback/trunk/logback-access/src/main/java/ch/qos/logback/access/net/SMTPAppender.java
==============================================================================
--- logback/trunk/logback-access/src/main/java/ch/qos/logback/access/net/SMTPAppender.java	(original)
+++ logback/trunk/logback-access/src/main/java/ch/qos/logback/access/net/SMTPAppender.java	Mon Nov 13 11:48:38 2006
@@ -135,7 +135,7 @@
    * Once an email is sent, the next one will not be sent unless a certain amount
    * of time passed.
    */
-  public boolean isTriggeringEvent(File file, Object eventObject) {
+  public boolean isTriggeringEvent(File activeFile, Object eventObject) {
     AccessEvent event = (AccessEvent) eventObject;
 
     if (TRIGGERING_STATUS_CODE <= event.getStatusCode()) {

Modified: logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/net/SMTPAppender.java
==============================================================================
--- logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/net/SMTPAppender.java	(original)
+++ logback/trunk/logback-classic/src/main/java/ch/qos/logback/classic/net/SMTPAppender.java	Mon Nov 13 11:48:38 2006
@@ -123,7 +123,7 @@
    * This method returns <code>true</code>, if the event level has ERROR
    * level or higher. Otherwise it returns <code>false</code>.
    */
-  public boolean isTriggeringEvent(File file, Object eventObject) {
+  public boolean isTriggeringEvent(File activeFile, Object eventObject) {
     LoggingEvent event = (LoggingEvent) eventObject;
     return event.getLevel().isGreaterOrEqual(Level.ERROR);
   }

Modified: logback/trunk/logback-core/src/main/java/ch/qos/logback/core/rolling/SizeBasedTriggeringPolicy.java
==============================================================================
--- logback/trunk/logback-core/src/main/java/ch/qos/logback/core/rolling/SizeBasedTriggeringPolicy.java	(original)
+++ logback/trunk/logback-core/src/main/java/ch/qos/logback/core/rolling/SizeBasedTriggeringPolicy.java	Mon Nov 13 11:48:38 2006
@@ -67,9 +67,9 @@
       setMaxFileSize(maxFileSize);
   }
 
-  public boolean isTriggeringEvent(final File file, final Object event) {
+  public boolean isTriggeringEvent(final File activeFile, final Object event) {
     //System.out.println("Size"+file.length());
-    return (file.length() >= maxFileSizeAsLong);
+    return (activeFile.length() >= maxFileSizeAsLong);
   }
 
   public String getMaxFileSize() {

Modified: logback/trunk/logback-core/src/main/java/ch/qos/logback/core/rolling/TimeBasedRollingPolicy.java
==============================================================================
--- logback/trunk/logback-core/src/main/java/ch/qos/logback/core/rolling/TimeBasedRollingPolicy.java	(original)
+++ logback/trunk/logback-core/src/main/java/ch/qos/logback/core/rolling/TimeBasedRollingPolicy.java	Mon Nov 13 11:48:38 2006
@@ -283,7 +283,7 @@
     }
   }
 
-  public boolean isTriggeringEvent(File file, final Object event) {
+  public boolean isTriggeringEvent(File activeFile, final Object event) {
     long n = System.currentTimeMillis();
 
     if (n >= nextCheck) {

Modified: logback/trunk/logback-core/src/main/java/ch/qos/logback/core/rolling/TriggeringPolicy.java
==============================================================================
--- logback/trunk/logback-core/src/main/java/ch/qos/logback/core/rolling/TriggeringPolicy.java	(original)
+++ logback/trunk/logback-core/src/main/java/ch/qos/logback/core/rolling/TriggeringPolicy.java	Mon Nov 13 11:48:38 2006
@@ -28,9 +28,9 @@
   /**
    * Should roll-over be triggered at this time?
    * 
-   * @param file A reference to the currently active log file. 
+   * @param activeFile A reference to the currently active log file. 
    * @param event A reference to the currently event. 
    * @return true if a roll-over should occur.
    */
-  public boolean isTriggeringEvent(final File file, final Object event);
+  public boolean isTriggeringEvent(final File activeFile, final Object event);
 }

Modified: logback/trunk/logback-examples/src/main/java/chapter4/mail/CounterBasedTP.java
==============================================================================
--- logback/trunk/logback-examples/src/main/java/chapter4/mail/CounterBasedTP.java	(original)
+++ logback/trunk/logback-examples/src/main/java/chapter4/mail/CounterBasedTP.java	Mon Nov 13 11:48:38 2006
@@ -23,7 +23,7 @@
   static int LIMIT = 1024;
   int counter = 0;
 
-  public boolean isTriggeringEvent(File file, Object event) {
+  public boolean isTriggeringEvent(File activeFile, Object event) {
     counter++;
 
     if (counter == LIMIT) {



More information about the logback-dev mailing list