-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
190 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
#pragma once | ||
|
||
#if LOG_TYPE == 0 | ||
#define TRACEX_(pFmt,...) | ||
#elif LOG_TYPE ==1 | ||
inline void TRACEX_(const char* pFmt, ...) | ||
{ | ||
CHAR s_log[8192]; | ||
|
||
va_list arg; | ||
va_start(arg, pFmt); | ||
_vsnprintf_s(s_log, sizeof(s_log), pFmt, arg); | ||
va_end(arg); | ||
|
||
printf("%s", s_log); | ||
|
||
return; | ||
}; | ||
inline void TRACEX_(const wchar_t* pFmt, ...) | ||
{ | ||
WCHAR s_log[8192]; | ||
|
||
va_list arg; | ||
va_start(arg, pFmt); | ||
_vsnwprintf_s(s_log, sizeof(s_log) / 2, pFmt, arg); | ||
va_end(arg); | ||
|
||
wprintf(s_log); | ||
|
||
return; | ||
}; | ||
#elif LOG_TYPE ==2 | ||
inline void TRACEX_(const char* pFmt, ...) | ||
{ | ||
CHAR s_log[8192]; | ||
|
||
va_list arg; | ||
va_start(arg, pFmt); | ||
_vsnprintf_s(s_log, sizeof(s_log), pFmt, arg); | ||
va_end(arg); | ||
|
||
OutputDebugStringA(s_log); | ||
|
||
return; | ||
}; | ||
inline void TRACEX_(const wchar_t* pFmt, ...) | ||
{ | ||
WCHAR s_log[8192]; | ||
|
||
va_list arg; | ||
va_start(arg, pFmt); | ||
_vsnwprintf_s(s_log, sizeof(s_log) / 2, pFmt, arg); | ||
va_end(arg); | ||
|
||
OutputDebugStringW(s_log); | ||
|
||
return; | ||
}; | ||
#endif |
Oops, something went wrong.