File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ InfoLoggerBackend::InfoLoggerBackend()
3232void InfoLoggerBackend::addGlobalTag (std::string name, std::string value)
3333{
3434 if (!tagString.empty ()) {
35- tagString += " " ;
35+ tagString += " , " ;
3636 }
3737 tagString += name + " =" + value;
3838}
@@ -58,13 +58,15 @@ void InfoLoggerBackend::send(const Metric& metric)
5858 std::string metricTags{};
5959 for (const auto & tag : metric.getTags ()) {
6060 if (!metricTags.empty ()) {
61- metricTags += " " ;
61+ metricTags += " , " ;
6262 }
6363 metricTags += tag.name + " =" + tag.value ;
6464 }
65- MonLogger::Get () << " InfoLoggerMonitoring : " << metric.getName () << " , "
66- << metric.getValue () << " Type: " << metric.getType () << " , "
67- << convertTimestamp (metric.getTimestamp ()) << " , " << tagString << " " << metricTags
65+ if (!metricTags.empty ()) {
66+ metricTags = " ," + metricTags;
67+ }
68+ MonLogger::Get () << " [METRIC] " << metric.getName () << " ," << metric.getType () << " " << metric.getValue ()
69+ << " " << convertTimestamp (metric.getTimestamp ()) << " " << tagString << metricTags
6870 << MonLogger::End ();
6971}
7072
You can’t perform that action at this time.
0 commit comments