5 // GCC/SDL port by Niels Wagenaar (Linux/WIN32) and Caz (BeOS)
6 // Cleanups/new stuff by James L. Hammons
11 FILE * log_stream = NULL;
13 int log_init(char * path)
15 log_stream = fopen(path, "wrt");
17 if (log_stream == NULL)
34 // This logger is used mainly to ensure that text gets written to the log file
35 // even if the program crashes. The performance hit is acceptable in this case!
37 void WriteLog(const char * text, ...)
42 vfprintf(log_stream, text, arg);
44 fflush(log_stream); // Make sure that text is written!