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

FileLogHandler should open file only once #28

Open
j-o opened this issue Jan 20, 2017 · 0 comments
Open

FileLogHandler should open file only once #28

j-o opened this issue Jan 20, 2017 · 0 comments

Comments

@j-o
Copy link

j-o commented Jan 20, 2017

Currently, the FileLogHandler opens the target file, writes the message and closes the file again for each log message, which is an unnecessary overhead.

Instead, the file should be opened once on construction and closed on destruction of the log handler. If it is desired to ensure that log messages are written to disk in case of a system crash, std::ostream::flush should be used. This behavior could be configurable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants