Title: [204527] trunk/Tools
Revision
204527
Author
aakash_j...@apple.com
Date
2016-08-16 15:24:23 -0700 (Tue, 16 Aug 2016)

Log Message

EWS logs file are rotated too quickly
https://bugs.webkit.org/show_bug.cgi?id=160724

Reviewed by Daniel Bates.

Currently we are rotating the log file after 10 iterations of queue. If the queue
doesn't have any pending patches, these iterations result in very small amount of
logs (1 KB log file). Even if the queue process some patches, logs are few KBs.
This results in a lot of log files in a day. This patch ensures that we rotate the
log file when its file size is greater than or equal to 100 KB.

* EWSTools/start-queue-mac.sh: Added check for file size before rotating log file.

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (204526 => 204527)


--- trunk/Tools/ChangeLog	2016-08-16 22:20:05 UTC (rev 204526)
+++ trunk/Tools/ChangeLog	2016-08-16 22:24:23 UTC (rev 204527)
@@ -1,3 +1,18 @@
+2016-08-16  Aakash Jain  <aakash_j...@apple.com>
+
+        EWS logs file are rotated too quickly
+        https://bugs.webkit.org/show_bug.cgi?id=160724
+
+        Reviewed by Daniel Bates.
+
+        Currently we are rotating the log file after 10 iterations of queue. If the queue
+        doesn't have any pending patches, these iterations result in very small amount of 
+        logs (1 KB log file). Even if the queue process some patches, logs are few KBs.
+        This results in a lot of log files in a day. This patch ensures that we rotate the
+        log file when its file size is greater than or equal to 100 KB.
+
+        * EWSTools/start-queue-mac.sh: Added check for file size before rotating log file.
+
 2016-08-16  Daniel Bates  <daba...@apple.com>
 
         WKSI static library should be named by major iOS revision, not individual updates

Modified: trunk/Tools/EWSTools/start-queue-mac.sh (204526 => 204527)


--- trunk/Tools/EWSTools/start-queue-mac.sh	2016-08-16 22:20:05 UTC (rev 204526)
+++ trunk/Tools/EWSTools/start-queue-mac.sh	2016-08-16 22:24:23 UTC (rev 204527)
@@ -55,7 +55,10 @@
     cd $EWS_HOME/$QUEUE_NAME-logs
     find . -mtime +30 -delete
     if [ -s $QUEUE_NAME.log ]; then
-        mv -f $QUEUE_NAME.log ${QUEUE_NAME}_$(date +%Y-%m-%d_%H-%m).log
+        filesize=$(stat -f%z "$QUEUE_NAME.log")  # filesize in bytes.
+        if [ $filesize -ge 100000 ]; then
+            mv -f $QUEUE_NAME.log ${QUEUE_NAME}_$(date +%Y-%m-%d_%H-%m).log
+        fi
     fi
     cd $WEBKIT_HOME
     
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to