Skip to content
This repository has been archived by the owner on Oct 7, 2020. It is now read-only.

Add a signal handler to flush logs on exit #58

Closed
alanz opened this issue Nov 11, 2015 · 4 comments
Closed

Add a signal handler to flush logs on exit #58

alanz opened this issue Nov 11, 2015 · 4 comments
Milestone

Comments

@alanz
Copy link
Collaborator

alanz commented Nov 11, 2015

At the moment if HIE is killed for any reason, it discards any logs that have not been flushed.

Add a set of signal handlers to flush the logs on SIGTERM etc.

Possible resource: http://zguide.zeromq.org/hs:interrupt

https://hackage.haskell.org/package/logging-3.0.2/docs/Control-Logging.html
https://hackage.haskell.org/package/fast-logger-2.4.1/docs/System-Log-FastLogger.html

Note: there is nothing holy about this logging package, it was just convenient.

@DanielG
Copy link
Collaborator

DanielG commented Nov 15, 2015

How about flushing every line in the log instead? Signal handlers are probably a pain most platforms other than Linux (i.e. WinDOS).

@gracjan
Copy link
Contributor

gracjan commented Nov 17, 2015

Line flushing is better. In case of kill -9 nothing is lost.

@alanz
Copy link
Collaborator Author

alanz commented Dec 2, 2015

This should probably go away as part of #112

@alanz
Copy link
Collaborator Author

alanz commented Dec 4, 2015

We flush on every write to the log now, from #120

@alanz alanz closed this as completed Dec 4, 2015
@alanz alanz added this to the prehistory milestone Feb 2, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants