When settings is set to default with kernel output log to a file. The initialize log does not output everything to the file unless enable the log filter to output more details. It has been reported by another tester by the way.
Apparently, we had not flushed the initialize log output to the file properly.
An important detail on this, is that the log file appears to be missing the last few lines when emulation is terminated.
This might be because the log file isn't flushed when the process terminates, or perhaps the way we terminate prevents the flushing of buffered file writes. Either way, this makes it difficult to troubleshoot specific cases, especially when log filtering is active (that results in less logging, so a higher chance that important messages aren't written to disc).
There is void setbuf(FILE *stream, char *buf); from stdio.h.
If stream is the log file, you can use setbuf(stream, NULL); to set the buffering mode to unbuffered. This should make all writes appear in the file, as soon as it is written to.
stderr is also unbuffered, by default. stdout is buffered & I set it to unbuffered via setbuf(stdout, NULL); at the beginning of main().
Most helpful comment
There is
void setbuf(FILE *stream, char *buf);fromstdio.h.If
streamis the log file, you can usesetbuf(stream, NULL);to set the buffering mode to unbuffered. This should make all writes appear in the file, as soon as it is written to.stderris also unbuffered, by default.stdoutis buffered & I set it to unbuffered viasetbuf(stdout, NULL);at the beginning ofmain().