Skip to content

Commit

Permalink
Merge pull request #3 from LiuYuHui/fix_error
Browse files Browse the repository at this point in the history
Fix: Use fmt::format instead of std::format
  • Loading branch information
Jackarain authored Jun 30, 2024
2 parents 04ff94d + da97025 commit 3dcca8a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions httpd/include/httpd/logging.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -769,15 +769,15 @@ class auto_logger_file__
fs::path filename;

if constexpr (LOG_MAXFILE_SIZE <= 0) {
auto logfile = std::format("{:04d}{:02d}{:02d}-{:02d}.log",
auto logfile = fmt::format("{:04d}{:02d}{:02d}-{:02d}.log",
ptm->tm_year + 1900,
ptm->tm_mon + 1,
ptm->tm_mday,
ptm->tm_hour);
filename = logpath / logfile;
} else {
auto utc_time = std::mktime(ptm);
auto logfile = std::format("{:04d}{:02d}{:02d}-{}.log",
auto logfile = fmt::format("{:04d}{:02d}{:02d}-{}.log",
ptm->tm_year + 1900,
ptm->tm_mon + 1,
ptm->tm_mday,
Expand Down

0 comments on commit 3dcca8a

Please sign in to comment.