25 static std::string
do_format(
FLogPack pack, std::format_string<Args...>&& fmt, Args&&... args) {
27 if (
sizeof...(args) == 0) {
31 f_msg = std::format(fmt, std::forward<Args>(args)...);
34 const auto tp = std::chrono::system_clock::time_point(std::chrono::milliseconds(pack.time));
36 const char* level_str;
38 case LogLevel::TRACE: level_str =
"[TRACE]";
40 case LogLevel::DEBUG: level_str =
"[DEBUG]";
42 case LogLevel::INFO: level_str =
"[INFO]";
44 case LogLevel::WARN: level_str =
"[WARN]";
46 case LogLevel::ERROR: level_str =
"[ERROR]";
48 case LogLevel::FATAL: level_str =
"[FATAL]";
50 default: level_str =
"[OUT]";
55 "{:%Y-%m-%d %H:%M:%S} [{}] {} {}",
56 std::chrono::time_point_cast<std::chrono::milliseconds>(tp),