mirror of
https://github.com/gabime/spdlog.git
synced 2026-04-10 11:34:29 +08:00
Add std::tm formatter, fix spdlog::stopwatch formatter, conditionally use fmt::runtime in test_errors
This commit is contained in:
@@ -48,7 +48,14 @@ public:
|
||||
} // namespace spdlog
|
||||
|
||||
// Support for fmt formatting (e.g. "{:012.9}" or just "{}")
|
||||
namespace fmt {
|
||||
namespace
|
||||
#ifdef SPDLOG_USE_STD_FORMAT
|
||||
std
|
||||
#else
|
||||
fmt
|
||||
#endif
|
||||
{
|
||||
|
||||
template<>
|
||||
struct formatter<spdlog::stopwatch> : formatter<double>
|
||||
{
|
||||
@@ -58,4 +65,4 @@ struct formatter<spdlog::stopwatch> : formatter<double>
|
||||
return formatter<double>::format(sw.elapsed().count(), ctx);
|
||||
}
|
||||
};
|
||||
} // namespace fmt
|
||||
} // namespace fmt/std
|
||||
|
||||
Reference in New Issue
Block a user