Comment out unneeded in default working mode logging and add changelog.

This commit is contained in:
2020-12-23 15:54:51 +05:00
parent 2e8fdb194c
commit 935d5d8109
2 changed files with 16 additions and 8 deletions

View File

@@ -1,7 +1,6 @@
package application
import (
"log"
"strings"
"go.dev.pztrn.name/metricator/internal/models"
@@ -27,7 +26,7 @@ func (a *Application) parse(body string) map[string]models.Metric {
continue
}
log.Println("Analyzing line:", line)
// log.Println("Analyzing line:", line)
name = a.getMetricName(line)
metric, found := data[name]
@@ -47,12 +46,8 @@ func (a *Application) parse(body string) map[string]models.Metric {
if strings.HasPrefix(line, "#") {
switch strings.Split(line, " ")[1] {
case "HELP":
log.Println("Got HELP line")
metric.Description = a.getMetricDescription(line)
case "TYPE":
log.Println("Got TYPE line")
metric.Type = a.getMetricType(line)
}
@@ -81,12 +76,12 @@ func (a *Application) parse(body string) map[string]models.Metric {
metric.Value = a.getMetricValue(line)
log.Printf("Got metric: %+v\n", metric)
// log.Printf("Got metric: %+v\n", metric)
data[name] = metric
}
log.Printf("Data parsed: %+v\n", data)
// log.Printf("Data parsed: %+v\n", data)
return data
}