This comes from a similar motivation to #156: trying to debug a new extension that's simply crashing. Logs currently get written according to the underlying filesystem API's internal buffering logic, which means that data can be lost during a crash—particularly logs that happen immediately leading up to the crash, which are usually the most important for debugging.
I believe this can be handled fairly easily by setting logger.flush_on(). Edit: Setting flush_on() manually doesn't seem to be sufficient... it may be necessary to build some sort of custom sink that closes and reopens the file each time 😕
This comes from a similar motivation to #156: trying to debug a new extension that's simply crashing. Logs currently get written according to the underlying filesystem API's internal buffering logic, which means that data can be lost during a crash—particularly logs that happen immediately leading up to the crash, which are usually the most important for debugging.
I believe this can be handled fairly easily by setting
logger.flush_on()
. Edit: Settingflush_on()
manually doesn't seem to be sufficient... it may be necessary to build some sort of custom sink that closes and reopens the file each time 😕