From 798a0aab2fbb5aed01bbd8419b65a03fb4602b3f Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 3 Apr 2017 15:54:25 +0200 Subject: Make agent simple systemd daemon, add worker stub --- bbot/diagnostics.cxx | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) (limited to 'bbot/diagnostics.cxx') diff --git a/bbot/diagnostics.cxx b/bbot/diagnostics.cxx index 1aa58f0..5c356f5 100644 --- a/bbot/diagnostics.cxx +++ b/bbot/diagnostics.cxx @@ -20,28 +20,26 @@ namespace bbot operator() (const diag_record& r) const { if (type_ != nullptr) - r << type_ << ": "; + r << type_; if (name_ != nullptr) r << name_ << ": "; } - void location_prologue_base:: - operator() (const diag_record& r) const - { - r << loc_.file << ':' << loc_.line << ':' << loc_.column << ": "; - - if (type_ != nullptr) - r << type_ << ": "; + const char* trace_type = "trace: "; + const char* trace_indent = "\n "; - if (name_ != nullptr) - r << name_ << ": "; + trace_mark_base:: + trace_mark_base (const char* name, const void* data) + : basic_mark_base (trace_type, trace_indent, name, data) + { } - const basic_mark error ("error"); - const basic_mark warn ("warning"); - const basic_mark info ("info"); - const basic_mark text (nullptr); - const fail_mark fail ("error"); - const fail_end endf; + basic_mark error ("error: "); + basic_mark warn ("warning: "); + basic_mark info ("info: "); + basic_mark text (nullptr); + fail_mark fail ("error: "); + + const fail_end endf; } -- cgit v1.1