mirror of
https://github.com/gabime/spdlog.git
synced 2025-09-29 01:29:35 +08:00
clang format
This commit is contained in:
@@ -23,7 +23,9 @@ static std::string log_to_str(const std::string &msg, const Args &...args) {
|
||||
|
||||
// log to str and return it with time
|
||||
template <typename... Args>
|
||||
static std::string log_to_str_with_time(spdlog::log_clock::time_point log_time, const std::string &msg, const Args &...args) {
|
||||
static std::string log_to_str_with_time(spdlog::log_clock::time_point log_time,
|
||||
const std::string &msg,
|
||||
const Args &...args) {
|
||||
std::ostringstream oss;
|
||||
auto oss_sink = std::make_shared<spdlog::sinks::ostream_sink_mt>(oss);
|
||||
spdlog::logger oss_logger("pattern_tester", oss_sink);
|
||||
@@ -80,8 +82,8 @@ TEST_CASE("GMT offset ", "[pattern_formatter]") {
|
||||
const auto now = std::chrono::system_clock::now();
|
||||
const auto yesterday = now - 24h;
|
||||
|
||||
REQUIRE(log_to_str_with_time(yesterday, "Some message", "%z", spdlog::pattern_time_type::utc, "\n") ==
|
||||
"+00:00\n");
|
||||
REQUIRE(log_to_str_with_time(yesterday, "Some message", "%z", spdlog::pattern_time_type::utc,
|
||||
"\n") == "+00:00\n");
|
||||
}
|
||||
|
||||
TEST_CASE("color range test1", "[pattern_formatter]") {
|
||||
|
Reference in New Issue
Block a user