
It is possible that messages logged immediately before exiting are not flushed to disk. Flushing all logs before exiting from the main function guarantees that any relevant log messages are flushed to disk.
It is possible that messages logged immediately before exiting are not flushed to disk. Flushing all logs before exiting from the main function guarantees that any relevant log messages are flushed to disk.