Logger::cout: Use fmt()

This ensures that in cout(s), 's' does not get interpreted as a format
string.
This commit is contained in:
Eelco Dolstra 2023-03-02 14:52:37 +01:00
parent 989b823ac5
commit 09f5975c6a

View File

@ -102,11 +102,9 @@ public:
virtual void writeToStdout(std::string_view s); virtual void writeToStdout(std::string_view s);
template<typename... Args> template<typename... Args>
inline void cout(const std::string & fs, const Args & ... args) inline void cout(const Args & ... args)
{ {
boost::format f(fs); writeToStdout(fmt(args...));
formatHelper(f, args...);
writeToStdout(f.str());
} }
virtual std::optional<char> ask(std::string_view s) virtual std::optional<char> ask(std::string_view s)