mirror of
https://github.com/gabime/spdlog.git
synced 2024-11-27 07:14:12 +08:00
Moved SPDLOG_FUNCTION define to common.h
This commit is contained in:
parent
4408e079ff
commit
57c3023881
@ -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;
|
||||
|
@ -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__)
|
||||
|
Loading…
Reference in New Issue
Block a user