diff options
author | Colin Cross <ccross@android.com> | 2016-11-16 00:05:34 (GMT) |
---|---|---|
committer | Colin Cross <ccross@android.com> | 2021-02-05 20:08:17 (GMT) |
commit | ad3d29fb5375c3122b2318ea5efad170b83e74e5 (patch) | |
tree | 0ef19b733a8918f9374f1999dbff2b90a04e4876 /src/status.h | |
parent | 589f5b2497929a50a1c74786478cc6fea7a2e1c6 (diff) | |
download | Ninja-ad3d29fb5375c3122b2318ea5efad170b83e74e5.zip Ninja-ad3d29fb5375c3122b2318ea5efad170b83e74e5.tar.gz Ninja-ad3d29fb5375c3122b2318ea5efad170b83e74e5.tar.bz2 |
Put builder output through status interface
Send all output after manifest parsing is finished to the Status
interface, so that when status frontends are added they can handle
build messages.
Diffstat (limited to 'src/status.h')
-rw-r--r-- | src/status.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/status.h b/src/status.h index 8344b8e..e211ba3 100644 --- a/src/status.h +++ b/src/status.h @@ -31,10 +31,15 @@ struct Status { virtual void BuildLoadDyndeps() = 0; virtual void BuildStarted() = 0; virtual void BuildFinished() = 0; + + virtual void Info(const char* msg, ...) = 0; + virtual void Warning(const char* msg, ...) = 0; + virtual void Error(const char* msg, ...) = 0; + virtual ~Status() { } }; -/// Implementation of the BuildStatus interface that prints the status as +/// Implementation of the Status interface that prints the status as /// human-readable strings to stdout struct StatusPrinter : Status { explicit StatusPrinter(const BuildConfig& config); @@ -45,6 +50,11 @@ struct StatusPrinter : Status { virtual void BuildLoadDyndeps(); virtual void BuildStarted(); virtual void BuildFinished(); + + virtual void Info(const char* msg, ...); + virtual void Warning(const char* msg, ...); + virtual void Error(const char* msg, ...); + virtual ~StatusPrinter() { } /// Format the progress status string by replacing the placeholders. |