* Copyright (c) 1995-2004, Index Data
* See the file LICENSE for details.
*
- * $Id: log.c,v 1.3 2004-11-02 11:37:21 heikki Exp $
+ * $Id: log.c,v 1.5 2004-11-02 12:57:54 heikki Exp $
*/
/**
{ LOG_APP2 , "app2" },
{ LOG_APP3 , "app3" },
{ LOG_ALL, "all" },
+ { LOG_FLUSH, "flush" },
{ 0, "none" },
{ 0, NULL }
};
tbuf[TIMEFORMAT_LEN-1]='\0';
fprintf(l_file, "%s %s%s %s%s\n", tbuf, l_prefix, flags,
l_prefix2, buf);
- fflush(l_file);
+ if (l_level & (LOG_FLUSH|LOG_DEBUG) )
+ fflush(l_file);
if (end_hook_func)
(*end_hook_func)(o_level, buf, end_hook_info);
}