Skip to content

Commit

Permalink
Moved SPDLOG_FUNCTION define to common.h
Browse files Browse the repository at this point in the history
  • Loading branch information
gabime committed Jan 10, 2019
1 parent 4408e07 commit 57c3023
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 4 additions & 0 deletions include/spdlog/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 0 additions & 4 deletions include/spdlog/spdlog.h
Original file line number Diff line number Diff line change
Expand Up @@ -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__)
Expand Down

0 comments on commit 57c3023

Please sign in to comment.