mirror of
https://github.com/gabime/spdlog.git
synced 2025-04-30 20:33:51 +00:00
clang format
This commit is contained in:
parent
c8b81a6958
commit
8319d1bc16
@ -6,7 +6,6 @@
|
|||||||
#include <cerrno>
|
#include <cerrno>
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
|
|
||||||
|
|
||||||
#include "spdlog/common.h"
|
#include "spdlog/common.h"
|
||||||
#include "spdlog/details/os.h"
|
#include "spdlog/details/os.h"
|
||||||
|
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
// Distributed under the MIT License (http://opensource.org/licenses/MIT)
|
// Distributed under the MIT License (http://opensource.org/licenses/MIT)
|
||||||
|
|
||||||
#include "spdlog/details/registry.h"
|
#include "spdlog/details/registry.h"
|
||||||
|
|
||||||
#include "spdlog/common.h"
|
#include "spdlog/common.h"
|
||||||
#include "spdlog/logger.h"
|
#include "spdlog/logger.h"
|
||||||
#include "spdlog/pattern_formatter.h"
|
#include "spdlog/pattern_formatter.h"
|
||||||
|
@ -85,7 +85,7 @@ bool logger::should_flush_(const details::log_msg &msg) {
|
|||||||
return (msg.log_level >= flush_level) && (msg.log_level != level::off);
|
return (msg.log_level >= flush_level) && (msg.log_level != level::off);
|
||||||
}
|
}
|
||||||
|
|
||||||
void logger::err_handler_(const std::string &msg) {
|
void logger::err_handler_(const std::string &msg) {
|
||||||
if (custom_err_handler_) {
|
if (custom_err_handler_) {
|
||||||
custom_err_handler_(msg);
|
custom_err_handler_(msg);
|
||||||
} else {
|
} else {
|
||||||
@ -97,9 +97,8 @@ bool logger::should_flush_(const details::log_msg &msg) {
|
|||||||
#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 ***] [%s] [%s] %s\n", date_buf, name().c_str(), msg.c_str());
|
REprintf("[*** LOG ERROR ***] [%s] [%s] %s\n", date_buf, name().c_str(), msg.c_str());
|
||||||
#else
|
#else
|
||||||
std::fprintf(stderr, "[*** LOG ERROR ***] [%s] [%s] %s\n", date_buf,
|
std::fprintf(stderr, "[*** LOG ERROR ***] [%s] [%s] %s\n", date_buf, name().c_str(), msg.c_str());
|
||||||
name().c_str(), msg.c_str());
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} // namespace spdlog
|
} // namespace spdlog
|
||||||
|
Loading…
x
Reference in New Issue
Block a user