mirror of
https://github.com/gabime/spdlog.git
synced 2025-10-02 03:19:02 +08:00
update clang format again
This commit is contained in:
@@ -74,7 +74,7 @@ SPDLOG_INLINE void logger::set_formatter(std::unique_ptr<formatter> f) {
|
||||
if (std::next(it) == sinks_.end()) {
|
||||
// last element - we can be move it.
|
||||
(*it)->set_formatter(std::move(f));
|
||||
break; // to prevent clang-tidy warning
|
||||
break; // to prevent clang-tidy warning
|
||||
} else {
|
||||
(*it)->set_formatter(f->clone());
|
||||
}
|
||||
@@ -121,8 +121,9 @@ SPDLOG_INLINE std::shared_ptr<logger> logger::clone(std::string logger_name) {
|
||||
}
|
||||
|
||||
// protected methods
|
||||
SPDLOG_INLINE void
|
||||
logger::log_it_(const spdlog::details::log_msg &log_msg, bool log_enabled, bool traceback_enabled) {
|
||||
SPDLOG_INLINE void logger::log_it_(const spdlog::details::log_msg &log_msg,
|
||||
bool log_enabled,
|
||||
bool traceback_enabled) {
|
||||
if (log_enabled) {
|
||||
sink_it_(log_msg);
|
||||
}
|
||||
@@ -185,7 +186,7 @@ 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(USING_R) && defined(R_R_H) // if in R environment
|
||||
#if defined(USING_R) && defined(R_R_H) // if in R environment
|
||||
REprintf("[*** LOG ERROR #%04zu ***] [%s] [%s] %s\n", err_counter, date_buf, name().c_str(),
|
||||
msg.c_str());
|
||||
#else
|
||||
@@ -194,4 +195,4 @@ SPDLOG_INLINE void logger::err_handler_(const std::string &msg) {
|
||||
#endif
|
||||
}
|
||||
}
|
||||
} // namespace spdlog
|
||||
} // namespace spdlog
|
||||
|
Reference in New Issue
Block a user