Rev 22 | Rev 59 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 22 | Rev 57 | ||
---|---|---|---|
Line 669... | Line 669... | ||
669 | { |
669 | { |
670 | // helper function for debug logging |
670 | // helper function for debug logging |
671 | 671 | ||
672 | FILE *fp; |
672 | FILE *fp; |
673 | va_list argptr; |
673 | va_list argptr; |
674 | - | ||
675 | // concatenate all the arguments in one string |
- | |
676 | va_start (argptr, fmt); |
- | |
677 | _vsnwprintf_s (log_message, WCHAR_SIZEOF (log_message), _TRUNCATE, fmt, argptr); |
- | |
678 | va_end (argptr); |
- | |
679 | 674 | ||
680 | // open the log file in append mode |
675 | // open the log file in append mode |
681 | _wfopen_s (&fp, logfile_pathname, L"ab"); |
676 | _wfopen_s (&fp, logfile_pathname, L"ab"); |
682 | if (fp != NULL) |
677 | if (fp != NULL) |
683 | { |
678 | { |
- | 679 | va_start (argptr, fmt); |
|
684 |
|
680 | vfwprintf_s (fp, fmt, argptr); // concatenate all the arguments in one string |
- | 681 | va_end (argptr); |
|
685 | fclose (fp); // flush buffers and close it |
682 | fclose (fp); // flush buffers and close it |
686 | } |
683 | } |
687 | 684 | ||
688 | return; // finished |
685 | return; // finished |
689 | } |
686 | } |