Moved SPDLOG_FUNCTION define to common.h

This commit is contained in:
gabime 2019-01-10 19:18:31 +02:00
parent 4408e079ff
commit 57c3023881
2 changed files with 4 additions and 4 deletions

View File

@ -64,6 +64,10 @@
#define SPDLOG_FILE_BASENAME(file) SPDLOG_STRRCHR("/" file, '/') + 1
#endif
#ifndef SPDLOG_FUNCTION
#define SPDLOG_FUNCTION __FUNCTION__
#endif
namespace spdlog {
class formatter;

View File

@ -311,10 +311,6 @@ inline void critical(const wchar_t *fmt, const Args &... args)
// SPDLOG_LEVEL_OFF
//
#ifndef SPDLOG_FUNCTION
#define SPDLOG_FUNCTION __FUNCTION__
#endif
#define SPDLOG_LOGGER_CALL(logger, level, ...) \
if (logger->should_log(level)) \
logger->log(spdlog::source_loc{SPDLOG_FILE_BASENAME(__FILE__), __LINE__, SPDLOG_FUNCTION}, level, __VA_ARGS__)