Skip to content

Commit

Permalink
Merge pull request #289 from snoyberg/set-log-backup-number
Browse files Browse the repository at this point in the history
fixes #288, set log backup number to 20
  • Loading branch information
jappeace authored Mar 7, 2024
2 parents 28ba9b5 + 5d9b34a commit 4f6f386
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
3 changes: 3 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@

## 2.1.5
+ Fix OOM bug on logfile rotation

## 2.1.4
+ bump package versions, tls, warp and zlib

Expand Down
2 changes: 1 addition & 1 deletion keter.cabal
Original file line number Diff line number Diff line change
@@ -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.

Expand Down
6 changes: 5 additions & 1 deletion src/Keter/Logger.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4f6f386

Please sign in to comment.