remove excess log rotation; openLog rotates
This commit is contained in:
parent
0d4b513ec2
commit
7a8833c81d
1 changed files with 1 additions and 4 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue