Skip to content

Commit

Permalink
fix: build error
Browse files Browse the repository at this point in the history
  • Loading branch information
MistEO committed Oct 31, 2023
1 parent 01f7d0a commit 33be9e0
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions source/include/Utils/Logger.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ class MAA_UTILS_API Logger
public:
template <typename... args_t>
LogStream(std::mutex& m, std::ofstream& s, level lv, bool std_out, args_t&&... args)
: mutex_(m), lv_(lv), stdout_(std_out), stream_(s)
: mutex_(m), stream_(s), lv_(lv), stdout_(std_out)
{
stream(std::boolalpha);
stream_props(std::forward<args_t>(args)...);
Expand All @@ -87,7 +87,7 @@ class MAA_UTILS_API Logger
stdout_buf_ << "\033[0m";
std::cout << utf8_to_crt(stdout_buf_.str()) << std::endl;
}
stream_ << std::move(buffer_).str() << std::endl;
stream_ << std::move(ofs_buffer_).str() << std::endl;
}

template <typename T>
Expand Down Expand Up @@ -138,7 +138,7 @@ class MAA_UTILS_API Logger
if (stdout_) {
stdout_buf_ << content << sep_.str;
}
buffer_ << std::forward<decltype(content)>(content) << sep_.str;
ofs_buffer_ << std::forward<decltype(content)>(content) << sep_.str;
}

template <typename... args_t>
Expand Down Expand Up @@ -168,12 +168,12 @@ class MAA_UTILS_API Logger
private:
std::mutex& mutex_;
std::ofstream& stream_;
level lv_ = level::error;
bool stdout_ = false;
separator sep_ = separator::space;
const level lv_ = level::error;
const bool stdout_ = false;

separator sep_ = separator::space;
std::stringstream stdout_buf_;
std::stringstream buffer_;
std::stringstream ofs_buffer_;
};

public:
Expand Down

0 comments on commit 33be9e0

Please sign in to comment.