Skip to content

Commit 78582f1

Browse files
committed
Merge branch 'master' of github.com:Devsh-Graphics-Programming/Nabla
2 parents 9339480 + e440c5f commit 78582f1

File tree

6 files changed

+517
-93
lines changed

6 files changed

+517
-93
lines changed

include/nbl/logging_macros.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#if defined(NBL_LOG) || defined(NBL_LOG_ERROR)
2+
#error redefinition of NBL_LOG/NBL_LOG_ERROR. did you forgot to undefine logging macros somewhere? #include "nbl/undefine_logging_macros.h"
3+
#elif !defined(_GIT_INFO_H_INCLUDED_)
4+
#error logging macros require git meta info, include "git_info.h"
5+
#else
6+
#define NBL_LOG(SEVERITY, FORMAT, ...) NBL_LOG_FUNCTION(FORMAT" [%s][%s - %s:%d]", SEVERITY, __VA_ARGS__, nbl::gtml::nabla_git_info.commitShortHash, __FUNCTION__, __FILE__, __LINE__);
7+
#define NBL_LOG_ERROR(FORMAT, ...) NBL_LOG(nbl::system::ILogger::ELL_ERROR, FORMAT, __VA_ARGS__)
8+
#endif

include/nbl/undef_logging_macros.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#undef NBL_LOG
2+
#undef NBL_LOG_ERROR
3+
#undef NBL_LOG_FUNCTION

0 commit comments

Comments
 (0)