Пример #1
0
//===========================================================================
//
// Parameter:			-
// Returns:				-
// Changes Globals:		-
//===========================================================================
void Log_Print(char *fmt, ...)
{
    va_list ap;
    char buf[2048];

    va_start(ap, fmt);
    vsprintf(buf, fmt, ap);
    va_end(ap);

    if (verbose)
    {
#ifdef WINBSPC
        WinBSPCPrint(buf);
#else
        printf("%s", buf);
#endif //WINBSPS
    } //end if

    if (logfile.fp)
    {
        Log_UnifyEndOfLine(buf);
        fprintf(logfile.fp, "%s", buf);
        fflush(logfile.fp);
    } //end if
} //end of the function Log_Print
Пример #2
0
//===========================================================================
//
// Parameter:				-
// Returns:					-
// Changes Globals:		-
//===========================================================================
void Log_Write(char *fmt, ...)
{
    va_list ap;
    char buf[2048];

    if (!logfile.fp) return;
    va_start(ap, fmt);
    vsprintf(buf, fmt, ap);
    va_end(ap);
    Log_UnifyEndOfLine(buf);
    fprintf(logfile.fp, "%s", buf);
    fflush(logfile.fp);
} //end of the function Log_Write
Пример #3
0
//===========================================================================
//
// Parameter:			-
// Returns:				-
// Changes Globals:		-
//===========================================================================
void Log_Print(char *fmt, ...)
{
	va_list ap;
	char buf[2048];

	va_start(ap, fmt);
	Q_vsnprintf(buf, sizeof (buf), fmt, ap);
	va_end(ap);

	if (verbose)
	{
		printf("%s", buf);
	} //end if

	if (logfile.fp)
	{
		Log_UnifyEndOfLine(buf);
		fprintf(logfile.fp, "%s", buf);
		fflush(logfile.fp);
	} //end if
} //end of the function Log_Print