aboutsummaryrefslogtreecommitdiff
path: root/bbot/agent.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'bbot/agent.cxx')
-rw-r--r--bbot/agent.cxx38
1 files changed, 8 insertions, 30 deletions
diff --git a/bbot/agent.cxx b/bbot/agent.cxx
index b2beed8..8e13720 100644
--- a/bbot/agent.cxx
+++ b/bbot/agent.cxx
@@ -683,10 +683,6 @@ handle_signal (int sig)
}
}
-// Right arrow followed by newline.
-//
-const char systemd_indent[] = "\xE2\x86\xB2\n";
-
int
main (int argc, char* argv[])
try
@@ -696,34 +692,16 @@ try
verb = ops.verbose ();
- // Note that unlike other projects, here we distinguish between fail
- // (critical error, agent terminates) and error (non-fatal error, agent
- // continues to run). This means we should be careful not using fail
- // to report normal errors and vice-versa.
- //
if (ops.systemd_daemon ())
{
- // Map to systemd severity prefixes (see sd-daemon(3) for details). Note
- // that here we assume we will never have location (like file name which
- // would end up being before the prefix).
- //
- trace_indent =
- fail.indent_ =
- error.indent_ =
- warn.indent_ =
- info.indent_ =
- text.indent_ = systemd_indent;
-
- fail.type_ = "<2>";
- error.type_ = "<3>";
- warn.type_ = "<4>";
- info.type_ = "<6>";
- trace_type = "<7>";
-
- info << "bbot agent for " << tc_name << '/' << tc_num <<
- info << "toolchain id " << tc_id <<
- info << "CPU(s) " << ops.cpu () <<
- info << "RAM(kB) " << ops.ram ();
+ systemd_diagnostics (true); // With critical errors.
+
+ info << "bbot agent " << BBOT_VERSION_STR <<
+ info << "toolchain name " << tc_name <<
+ info << "toolchain num " << tc_num <<
+ info << "toolchain id " << tc_id <<
+ info << "CPU(s) " << ops.cpu () <<
+ info << "RAM(kB) " << ops.ram ();
}
tracer trace ("main");