Example #1
0
//----------------------------------------------------------------------
static void vlog(const char *format, va_list va)
{
  static FILE *fp = NULL;
  if ( fp == NULL ) fp = fopenWT("debug_log");
  qvfprintf(fp, format, va);
  qflush(fp);
}
Example #2
0
void
log_error_msg(const char *format, ...)
{
    va_list args;
    va_start(args, format);
    if (g_config.generate_log == 1)
    {
        qvfprintf(g_log_file, format, args);
    }
    else
    {
        vmsg(format, args);
    }

    va_end(args);
}