check SPDLOG_SOURCE_LOCATION in macros and in runtime

This commit is contained in:
gabime
2023-09-23 02:02:50 +03:00
parent ea1c829764
commit 7c0afada60
5 changed files with 11 additions and 13 deletions

View File

@@ -155,7 +155,7 @@ inline void log(log_level lvl, S fmt, Args &&...args)
default_logger_raw()->log(lvl, fmt, std::forward<Args>(args)...);
}
#ifdef SPDLOG_EMIT_SOURCE_LOCATION
#ifdef SPDLOG_SOURCE_LOCATION
template<typename... Args>
inline void trace(loc_with_fmt fmt, Args &&...args)
{
@@ -306,7 +306,7 @@ inline void critical(string_view_t msg)
// SPDLOG_LEVEL_OFF
//
#ifndef SPDLOG_NO_SOURCE_LOC
#ifdef SPDLOG_SOURCE_LOCATION
# define SPDLOG_LOGGER_CALL(logger, level, ...) \
(logger)->log(spdlog::source_loc{__FILE__, __LINE__, SPDLOG_FUNCTION}, level, __VA_ARGS__)
#else