From 7a8833c81d40bf70cf9758e5bd2b7e2f82512889 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 1 Mar 2013 16:55:54 -0400 Subject: [PATCH] remove excess log rotation; openLog rotates --- Assistant/Threads/SanityChecker.hs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Assistant/Threads/SanityChecker.hs b/Assistant/Threads/SanityChecker.hs index ab972e6d89..0a1b156990 100644 --- a/Assistant/Threads/SanityChecker.hs +++ b/Assistant/Threads/SanityChecker.hs @@ -103,10 +103,7 @@ checkLogSize n = do totalsize <- liftIO $ sum <$> mapM filesize logs when (totalsize > oneMegabyte) $ do notice ["Rotated logs due to size:", show totalsize] - liftIO $ do - rotateLog f - logfd <- openLog f - redirLog logfd + liftIO $ openLog f >>= redirLog when (n < maxLogs + 1) $ checkLogSize $ n + 1 where