Mercurial > gemma
diff pkg/controllers/cross.go @ 5495:0766dcb7e7f8
Merged logging branch into default.
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Tue, 21 Sep 2021 12:49:30 +0200 |
parents | 5f47eeea988d |
children |
line wrap: on
line diff
--- a/pkg/controllers/cross.go Sat Aug 21 15:01:52 2021 +0200 +++ b/pkg/controllers/cross.go Tue Sep 21 12:49:30 2021 +0200 @@ -17,10 +17,10 @@ "context" "database/sql" "fmt" - "log" "net/http" "time" + "gemma.intevation.de/gemma/pkg/log" "gemma.intevation.de/gemma/pkg/mesh" "gemma.intevation.de/gemma/pkg/models" @@ -78,7 +78,7 @@ ctx, conn, csi.Properties.Bottleneck, csi.Properties.Date.Time) - log.Printf("info: loading mesh took %s\n", time.Since(start)) + log.Infof("loading mesh took %s\n", time.Since(start)) if err != nil { return } @@ -110,7 +110,7 @@ coords, err := reproject(ctx, rp, csi.Geometry.Coordinates) - log.Printf("info: transforming input coords took %s\n", time.Since(start)) + log.Infof("transforming input coords took %s\n", time.Since(start)) if err != nil { return } @@ -133,16 +133,16 @@ }) if len(line) > 0 { - log.Printf("info: line length: %d\n", len(line)) + log.Infof("line length: %d\n", len(line)) // They are all on the segment (c1.Lat, c1.Lon) - (c2.Lat, c2.Lon). // Sort them by project them on this line. joined := line.JoinOnLine(c1.Lat, c1.Lon, c2.Lat, c2.Lon) - log.Printf("info: joined length: %d\n", len(joined)) + log.Infof("joined length: %d\n", len(joined)) segments = append(segments, joined...) } } - log.Printf("info: mesh traversal took %s\n", time.Since(start)) + log.Infof("mesh traversal took %s\n", time.Since(start)) start = time.Now() @@ -153,7 +153,7 @@ conn, ) - log.Printf("info: projecting back took %s\n", time.Since(start)) + log.Infof("projecting back took %s\n", time.Since(start)) if err != nil { return }