I am on Windows 7 using boost :: log in v1.54 in a console application. I use add_file_log () with rotation, which works fine while my main () function exits. But if the application exits externally using powershell CloseMainWindow (), the log file is never written.
I installed the Windows control handler using SetConsoleCtrlHandler (), and I can block CTRL_CLOSE_EVENT, but I donβt know if there is a boost :: log method that I can call to force the log file to write before my application exits. Does anyone have a solution for this?
Thanks,
Rob
, .
1) , . auto_flush, . , , CTRL_CLOSE_EVENT.
2) , , . , , . , . file_name , , . , , .
,