From 5d9b34a4d09f6f258a9721fcd4a292608d589f2c Mon Sep 17 00:00:00 2001 From: Jappie Klooster Date: Thu, 7 Mar 2024 14:21:20 +0100 Subject: [PATCH] fixes #288, set log backup number to 20 update changelog --- ChangeLog.md | 3 +++ keter.cabal | 2 +- src/Keter/Logger.hs | 6 +++++- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ChangeLog.md b/ChangeLog.md index 3d339105..05f64516 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -1,4 +1,7 @@ +## 2.1.5 ++ Fix OOM bug on logfile rotation + ## 2.1.4 + bump package versions, tls, warp and zlib diff --git a/keter.cabal b/keter.cabal index d158edef..a1c63d2e 100644 --- a/keter.cabal +++ b/keter.cabal @@ -1,6 +1,6 @@ cabal-version: 3.0 name: keter -version: 2.1.4 +version: 2.1.5 synopsis: Web application deployment manager, focusing on Haskell web frameworks. It mitigates downtime. diff --git a/src/Keter/Logger.hs b/src/Keter/Logger.hs index e3a9fab9..103133e9 100644 --- a/src/Keter/Logger.hs +++ b/src/Keter/Logger.hs @@ -48,7 +48,11 @@ createLoggerViaConfig KeterConfig{..} name = do defaultRotationSpec :: FilePath -> FL.FileLogSpec defaultRotationSpec dir = - FL.FileLogSpec dir defaultMaxTotal maxBound -- TODO: do we want to overwrite logs after a certain point? leaving this INT_MAX for now + FL.FileLogSpec + { log_file = dir + , log_file_size = defaultMaxTotal + , log_backup_number = 20 + } -- | The default total file size before for a log file before it needs to be rotated defaultMaxTotal :: Integer