aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2023-03-02 14:52:37 +0100
committerEelco Dolstra <edolstra@gmail.com>2023-03-02 14:52:37 +0100
commit09f5975c6a0d8706b22f15e4c5998018e56484ae (patch)
tree8ceb909c26649790074185c64d687ee0d20298d8
parent989b823ac5265a7738396566fa0792f3cb55160e (diff)
Logger::cout: Use fmt()
This ensures that in cout(s), 's' does not get interpreted as a format string.
-rw-r--r--src/libutil/logging.hh6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/libutil/logging.hh b/src/libutil/logging.hh
index 4642c49f7..a68edd15a 100644
--- a/src/libutil/logging.hh
+++ b/src/libutil/logging.hh
@@ -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)