XRay feature – fdr log flushing


Also, I’ve noticed that FDR mode doesn’t flush to a log unless programmatically configured to do so unlike basic mode, which flushes by default. Would it be possible to add this feature as well?



FDR mode is specifically implemented so that the log is only flushed on-demand. Can you describe the use-case for “default flushing” a little bit more?

Adding an “exit handler” that will flush the currently installed XRay mode is tricky, but not impossible. It’s definitely something worth exploring more.


-- Dean

I might have been unclear with the term default flushing. Basic mode produces a log without being programmatically configured to do so. (Writing to a log can be enabled by configuring the environment variable).

Yes, I think I understood what you meant with default flushing.

I’m saying it’s possible to add this behaviour in FDR mode, but to only flush at program exit. It should not be too hard to add, but making it work generically (in FDR, Profiling, and Basic mode) is going to be tricky (i.e. whether this was going to be done at program exit, etc.).

Making FDR mode “keep writing” like Basic mode does is going to be much harder because FDR mode wasn’t designed to work that way.

-- Dean