diff options
author | Ben Burdette <bburdette@gmail.com> | 2020-05-11 14:35:30 -0600 |
---|---|---|
committer | Ben Burdette <bburdette@gmail.com> | 2020-05-11 14:35:30 -0600 |
commit | 59b1f5c70150a81c7a6fa0dc3309a9d44e9621f8 (patch) | |
tree | 542fc01dfaffdf7acbc5c1a89fd41a0918396f4b /src/libutil/logging.hh | |
parent | 536bbf53e12c80f52c2679aec734d895b0058f5b (diff) | |
parent | 5bdb67c84308a8cc78ac633d27b94eca87ea4390 (diff) |
Merge branch 'master' into errors-phase-2
Diffstat (limited to 'src/libutil/logging.hh')
-rw-r--r-- | src/libutil/logging.hh | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/libutil/logging.hh b/src/libutil/logging.hh index 0c4980b83..bb7d356c8 100644 --- a/src/libutil/logging.hh +++ b/src/libutil/logging.hh @@ -7,7 +7,7 @@ namespace nix { typedef enum { actUnknown = 0, actCopyPath = 100, - actDownload = 101, + actFileTransfer = 101, actRealise = 102, actCopyPaths = 103, actBuilds = 104, @@ -76,6 +76,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(); |