1
Vote

no log when application dies

description

this is the most important charasteristics of a log. if the application crashes, the log should contain information about what code was run last.

my log is completely empty when my application crashes.

severity = serious

comments

krisgus wrote Aug 11, 2016 at 11:44 PM

Can you provide any details?

AbsolutelyFreeWeb wrote Aug 13, 2016 at 3:15 AM

I believe I fixed it by adding a flush to Logfile.cpp on line 160.

Where it said:
        int writeResultCode;
        size_t count = fwrite(logMessage.c_str(), sizeof(char), logMessage.size() , m_file);
        _get_errno(&writeResultCode);
make it:
        int writeResultCode;
        size_t count = fwrite(logMessage.c_str(), sizeof(char), logMessage.size() , m_file);
        fflush(m_file); 
        _get_errno(&writeResultCode);