diff options
author | Klaus Aehlig <klaus.aehlig@huawei.com> | 2022-03-30 15:36:56 +0200 |
---|---|---|
committer | Klaus Aehlig <klaus.aehlig@huawei.com> | 2022-04-04 19:31:22 +0200 |
commit | ab1a0a06dd80c2b7afbe0ba3dd48cf6eb454c1eb (patch) | |
tree | 066ac7a05450f9c4d2d48815866f253cf4f6c85d /src/buildtool/logging | |
parent | 0b977a243aa308f4530fe8b53e634d369feccb47 (diff) | |
download | justbuild-ab1a0a06dd80c2b7afbe0ba3dd48cf6eb454c1eb.tar.gz |
Add a new log level for progress updates
Diffstat (limited to 'src/buildtool/logging')
-rw-r--r-- | src/buildtool/logging/log_level.hpp | 7 | ||||
-rw-r--r-- | src/buildtool/logging/log_sink_cmdline.hpp | 3 |
2 files changed, 8 insertions, 2 deletions
diff --git a/src/buildtool/logging/log_level.hpp b/src/buildtool/logging/log_level.hpp index 6847e69c..7de1dab4 100644 --- a/src/buildtool/logging/log_level.hpp +++ b/src/buildtool/logging/log_level.hpp @@ -9,8 +9,9 @@ enum class LogLevel { Error, ///< Error messages, fatal errors Warning, ///< Warning messages, recoverable situations that shouldn't occur Info, ///< Informative messages, such as reporting status or statistics - Debug, ///< Debug messages, such as details from internal processes - Trace ///< Trace messages, verbose details such as function calls + Progress, ///< Information about the current progress of the build + Debug, ///< Debug messages, such as details from internal processes + Trace ///< Trace messages, verbose details such as function calls }; constexpr auto kFirstLogLevel = LogLevel::Error; @@ -31,6 +32,8 @@ constexpr auto kLastLogLevel = LogLevel::Trace; return "WARN"; case LogLevel::Info: return "INFO"; + case LogLevel::Progress: + return "PROG"; case LogLevel::Debug: return "DEBUG"; case LogLevel::Trace: diff --git a/src/buildtool/logging/log_sink_cmdline.hpp b/src/buildtool/logging/log_sink_cmdline.hpp index 0eef3589..f89acca5 100644 --- a/src/buildtool/logging/log_sink_cmdline.hpp +++ b/src/buildtool/logging/log_sink_cmdline.hpp @@ -79,6 +79,9 @@ class LogSinkCmdLine final : public ILogSink { case LogLevel::Info: style = fg(fmt::color::lime_green); break; + case LogLevel::Progress: + style = fg(fmt::color::dark_green); + break; case LogLevel::Debug: style = fg(fmt::color::yellow); break; |