static FILE * logStream = NULL;
static uint32_t logSize = 0;
-
bool InitLog(const char * path)
{
logStream = fopen(path, "wrt");
return true;
}
-
void LogDone(void)
{
if (logStream)
fclose(logStream);
}
-
//
// This logger is used mainly to ensure that text gets written to the log file
// even if the program crashes. The performance hit is acceptable in this case!
va_end(arg);
fflush(logStream); // Make sure that text is written!
}
-