We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
FileLogger
io
LoggingExtras.jl/src/Sinks/filelogger.jl
Lines 19 to 20 in d35e7c8
atexit(() -> close(io))
I have not seen any bugs from the current implementation, but I do worry one could lose logs when always_flush=false.
always_flush=false
The text was updated successfully, but these errors were encountered:
I believe open files are closed when Julia exits (at least if it doesn't crash, but then I don't think atexit hooks would run either).
Sorry, something went wrong.
Ah I guess that's https://github.com/JuliaLang/julia/blob/5dfaef7a67c9b58ed272ba8557bcad103bb814e3/base/iostream.jl#L28 or similar?
Probably another reason JuliaLang/julia#51466 is dangerous then. But I guess it is safe for now, as long as we keep running finalizers on exit
the fear of losing logs due to a hard-crash when always_flush is false, is exactly why we provide the always_flush flag.
always_flush
No branches or pull requests
LoggingExtras.jl/src/Sinks/filelogger.jl
Lines 19 to 20 in d35e7c8
Perhaps
atexit(() -> close(io))
would be appropriate?I have not seen any bugs from the current implementation, but I do worry one could lose logs when
always_flush=false
.The text was updated successfully, but these errors were encountered: