Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing reloading when rotate-logs is true #308

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/Keter/App.hs
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Commit title:

Fixing of issue https://github.com/snoyberg/keter/issues/296 "Reloading is broken in v2.1 with rotate-logs: True"

Don't put URLs in git commit titles. You can mention issues by tags, #296.

Suggested wording:

Fix reloading with rotate-logs: True

Resolves #296

Use git commit --amend to fix the title, and force-push to your branch, the PR will auto-update.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did it.

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
Loading