From 23cb1a1080a89868c39c57f67a42d1adbfd65699 Mon Sep 17 00:00:00 2001 From: Gabi Melman Date: Tue, 29 Sep 2020 02:20:43 +0300 Subject: [PATCH] Update logger-inl.h --- include/spdlog/logger-inl.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/spdlog/logger-inl.h b/include/spdlog/logger-inl.h index 224522d3..ccfe9622 100644 --- a/include/spdlog/logger-inl.h +++ b/include/spdlog/logger-inl.h @@ -247,11 +247,11 @@ SPDLOG_INLINE void logger::err_handler_(const std::string &msg) auto tm_time = details::os::localtime(system_clock::to_time_t(now)); char date_buf[64]; std::strftime(date_buf, sizeof(date_buf), "%Y-%m-%d %H:%M:%S", &tm_time); - #if !defined(R_R_H) || !defined(USING_R) +#if !defined(R_R_H) || !defined(USING_R) std::fprintf(stderr, "[*** LOG ERROR #%04zu ***] [%s] [%s] {%s}\n", err_counter, date_buf, name().c_str(), msg.c_str()); - #else +#else // compiled under R environment REprintf("[*** LOG ERROR #%04zu ***] [%s] [%s] {%s}\n", err_counter, date_buf, name().c_str(), msg.c_str()); - #endif +#endif } } } // namespace spdlog