From de5485060e84e85aa99d08cbba58db32fdc1f9e7 Mon Sep 17 00:00:00 2001 From: Gerd von Egidy Date: Tue, 5 Aug 2014 00:53:18 +0200 Subject: [PATCH] Beautify GraphiteWriter debug logging refs #6550 --- components/perfdata/graphitewriter.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/components/perfdata/graphitewriter.cpp b/components/perfdata/graphitewriter.cpp index 331f62084..3adc0357e 100644 --- a/components/perfdata/graphitewriter.cpp +++ b/components/perfdata/graphitewriter.cpp @@ -169,10 +169,13 @@ void GraphiteWriter::SendPerfdata(const String& prefix, const CheckResult::Ptr& void GraphiteWriter::SendMetric(const String& prefix, const String& name, double value) { std::ostringstream msgbuf; - msgbuf << prefix << "." << name << " " << Convert::ToString(value) << " " << static_cast(Utility::GetTime()) << "\n"; + msgbuf << prefix << "." << name << " " << Convert::ToString(value) << " " << static_cast(Utility::GetTime()); + Log(LogDebug, "GraphiteWriter", "Add to metric list:'" + msgbuf.str() + "'."); + + // do not send \n to debug log + msgbuf << "\n"; String metric = msgbuf.str(); - Log(LogDebug, "GraphiteWriter", "GraphiteWriter: Add to metric list:'" + metric + "'."); ObjectLock olock(this);