Megatest

Diff
Login

Differences From Artifact [f5b22f2e78]:

To Artifact [7b411d8eb3]:


121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
    ;; Rotate logs, logic: 
    ;;                 if > 500k and older than 1 week, remove previous compressed log and compress this log
    (directory-fold 
     (lambda (file rem)
       (if (and (string-match "^.*.log" file)
		(> (file-size (conc "logs/" file)) 200000))
	   (let ((gzfile (conc "logs/" file ".gz")))
	     (if (file-exists gzfile)
		 (begin
		   (debug:print-info 0 "removing " gzfile)
		   (delete-file gzfile)))
	     (debug:print-info 0 "compressing " file)
	     (system (conc "gzip logs/" file)))))
     '()
     "logs")







|







121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
    ;; Rotate logs, logic: 
    ;;                 if > 500k and older than 1 week, remove previous compressed log and compress this log
    (directory-fold 
     (lambda (file rem)
       (if (and (string-match "^.*.log" file)
		(> (file-size (conc "logs/" file)) 200000))
	   (let ((gzfile (conc "logs/" file ".gz")))
	     (if (file-exists? gzfile)
		 (begin
		   (debug:print-info 0 "removing " gzfile)
		   (delete-file gzfile)))
	     (debug:print-info 0 "compressing " file)
	     (system (conc "gzip logs/" file)))))
     '()
     "logs")