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);
template<typename... Args>
inline void cout(const std::string & fs, const Args & ... args)
inline void cout(const Args & ... args)
{
boost::format f(fs);
formatHelper(f, args...);
writeToStdout(f.str());
writeToStdout(fmt(args...));
}
virtual std::optional<char> ask(std::string_view s)