summaryrefslogtreecommitdiff
path: root/Assistant/Threads/SanityChecker.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2013-03-01 16:55:54 -0400
committerGravatar Joey Hess <joey@kitenet.net>2013-03-01 16:56:56 -0400
commitcd51ef84c469504a007dad7bea781eca88fff2b0 (patch)
treea1c3ebf45d3b23ebe2040b8589f5e6c407d98197 /Assistant/Threads/SanityChecker.hs
parent56249c26a6b1160de9f72e5fe5074c59528bfa8f (diff)
remove excess log rotation; openLog rotates
Diffstat (limited to 'Assistant/Threads/SanityChecker.hs')
-rw-r--r--Assistant/Threads/SanityChecker.hs5
1 files changed, 1 insertions, 4 deletions
diff --git a/Assistant/Threads/SanityChecker.hs b/Assistant/Threads/SanityChecker.hs
index ab972e6d8..0a1b15699 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