#include <stdio.h>
#include <stdarg.h>

bool
Record_log_msg (const char *format, ...)
{
       FILE* logfile;
       va_list args;

       if(!(logfile=fopen("log.txt", "a+")))
           return false;

       va_start(args, format);
       vfprintf(logfile, format, args);
       fflush(logfile);
       va_end(args);
       fclose(logfile);

       return true;
}