Skip to content

Commit

Permalink
Fixing of issue #296 "Reloading is broken in v2.1 with rotate-logs: T…
Browse files Browse the repository at this point in the history
…rue"
  • Loading branch information
ktak-007 committed Feb 16, 2025
1 parent 206b5d2 commit e5a532a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Keter/App.hs
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,11 @@ withLogger aid (Just var) f = do
mappLogger <- liftIO $ readTVarIO var
case mappLogger of
Nothing -> withRunInIO $ \rio ->
bracketOnError (Log.createLoggerViaConfig ascKeterConfig (appLogName aid)) Log.loggerClose (rio . f var)
bracketOnError (Log.createLoggerViaConfig ascKeterConfig (appLogName aid))
Log.loggerClose
$ \appLogger -> do
atomically $ writeTVar var $ Just appLogger
rio $ f var appLogger
Just appLogger -> f var appLogger

withSanityChecks :: BundleConfig -> KeterM AppStartConfig a -> KeterM AppStartConfig a
Expand Down

0 comments on commit e5a532a

Please sign in to comment.