Should log classes open/close a log file stream on each write to the log file or should it keep the log file stream open throughout the application\'s lifetime until all log
For large intensive applications, what I usually do is I keep the log file open for the duration of the application and have a separate thread that flushes log content in the memory to HDD periodically. File open and close operation require system calls, which is a lot of work if you look into lower level.