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

[question] How lumberjack works when there is a shutdown ? #193

Open
cmarmonier opened this issue Oct 13, 2023 · 1 comment
Open

[question] How lumberjack works when there is a shutdown ? #193

cmarmonier opened this issue Oct 13, 2023 · 1 comment

Comments

@cmarmonier
Copy link

cmarmonier commented Oct 13, 2023

Hello,

For my application, I use "lumberjack.v2" with zerolog on Linux embedded system.

Sometime, my application needs to shutdown the system.

In this case, how can I ensure that my log files are not corrupted?
How does it work when the Linux stop command is executed?
In my application, how can I block writing and know when current writes are finished?

Also, how can I do when power supply stops?

@dveeden
Copy link

dveeden commented Nov 21, 2023

Looks like you want some way to call Sync() on the file or open the file with O_SYNC.

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

No branches or pull requests

2 participants