diff options
Diffstat (limited to 'src/libutil/logging.hh')
-rw-r--r-- | src/libutil/logging.hh | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/libutil/logging.hh b/src/libutil/logging.hh index cde525358..3449f5080 100644 --- a/src/libutil/logging.hh +++ b/src/libutil/logging.hh @@ -78,6 +78,16 @@ public: virtual void stopActivity(ActivityId act) { }; virtual void result(ActivityId act, ResultType type, const Fields & fields) { }; + + virtual void writeToStdout(std::string_view s); + + template<typename... Args> + inline void stdout(const std::string & fs, const Args & ... args) + { + boost::format f(fs); + formatHelper(f, args...); + writeToStdout(f.str()); + } }; ActivityId getCurActivity(); |