summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/buildtool/common/cli.hpp2
-rw-r--r--src/buildtool/logging/log_level.hpp7
-rw-r--r--src/buildtool/logging/log_sink_cmdline.hpp3
-rwxr-xr-xtest/end-to-end/actions/action-equality.sh2
-rw-r--r--test/utils/logging/log_config.hpp1
5 files changed, 11 insertions, 4 deletions
diff --git a/src/buildtool/common/cli.hpp b/src/buildtool/common/cli.hpp
index bdd21286..8bb0ec89 100644
--- a/src/buildtool/common/cli.hpp
+++ b/src/buildtool/common/cli.hpp
@@ -14,7 +14,7 @@
#include "nlohmann/json.hpp"
#include "src/buildtool/logging/log_level.hpp"
-constexpr auto kDefaultLogLevel = LogLevel::Info;
+constexpr auto kDefaultLogLevel = LogLevel::Progress;
constexpr auto kDefaultTimeout = std::chrono::milliseconds{300000};
/// \brief Arguments common to all commands.
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;
diff --git a/test/end-to-end/actions/action-equality.sh b/test/end-to-end/actions/action-equality.sh
index 72762f30..ffe841f4 100755
--- a/test/end-to-end/actions/action-equality.sh
+++ b/test/end-to-end/actions/action-equality.sh
@@ -46,7 +46,7 @@ cat > TARGETS <<'EOI'
EOI
-bin/tool-under-test build -J 1 --local_build_root .tool-root -f build.log 2>&1
+bin/tool-under-test build -J 1 --local_build_root .tool-root -f build.log --log-limit 2 2>&1
cat build.log
echo
grep 'Processed.* 4 actions' build.log
diff --git a/test/utils/logging/log_config.hpp b/test/utils/logging/log_config.hpp
index 9f243d83..8c9c6388 100644
--- a/test/utils/logging/log_config.hpp
+++ b/test/utils/logging/log_config.hpp
@@ -25,6 +25,7 @@ static auto ReadLogLevelFromEnv() -> LogLevel {
case LogLevel::Error:
case LogLevel::Warning:
case LogLevel::Info:
+ case LogLevel::Progress:
case LogLevel::Debug:
case LogLevel::Trace:
return log_level;