Skip to content
Snippets Groups Projects
Verified Commit f0019887 authored by Tobias Frisch's avatar Tobias Frisch
Browse files

[#41] Classical MSVC extra branching

parent fb9cc784
Branches
Tags
1 merge request!59Resolve "Consistent logging"
Pipeline #25634 passed
...@@ -33,24 +33,32 @@ namespace vkcv { ...@@ -33,24 +33,32 @@ namespace vkcv {
} }
#ifndef NDEBUG #ifndef NDEBUG
#ifndef VKCV_DEBUG_MESSAGE_LEN
#define VKCV_DEBUG_MESSAGE_LEN 1024
#endif
#ifdef _MSC_VER
#define __PRETTY_FUNCTION__ __FUNCSIG__
#endif
#define vkcv_log(level, ...) { \ #define vkcv_log(level, ...) { \
char output_message [1024]; \ char output_message [ \
\ VKCV_DEBUG_MESSAGE_LEN \
sprintf( \ ]; \
output_message, \ std::snprintf( \
__VA_ARGS__ \ output_message, \
); \ VKCV_DEBUG_MESSAGE_LEN, \
\ __VA_ARGS__ \
std::fprintf( \ ); \
getLogOutput(level), \ std::fprintf( \
"[%s]: %s [%s, line %d: %s]\n", \ getLogOutput(level), \
vkcv::getLogName(level), \ "[%s]: %s [%s, line %d: %s]\n", \
output_message, \ vkcv::getLogName(level), \
__FILE__, \ output_message, \
__LINE__, \ __FILE__, \
__PRETTY_FUNCTION__ \ __LINE__, \
); \ __PRETTY_FUNCTION__ \
); \
} }
#else #else
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment