10#include "absl/strings/str_cat.h"
11#include "absl/strings/str_format.h"
17static const std::string kLogFileOut =
"yaze_log.txt";
19template <
typename... Args>
20static void logf(
const absl::FormatSpec<Args...> &format,
const Args &...args) {
21 std::string message = absl::StrFormat(format, args...);
22 auto timestamp = std::chrono::system_clock::now();
24 std::time_t now_tt = std::chrono::system_clock::to_time_t(timestamp);
25 std::tm tm = *std::localtime(&now_tt);
26 message = absl::StrCat(
"[", tm.tm_hour,
":", tm.tm_min,
":", tm.tm_sec,
"] ",
32 static std::ofstream fout(kLogFileOut, std::ios::out | std::ios::app);
Main namespace for the application.