Mercurial > gemma
diff pkg/mesh/triangulation.go @ 5490:5f47eeea988d logging
Use own logging package.
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Mon, 20 Sep 2021 17:45:39 +0200 |
parents | 3f0382e9f302 |
children | 1222b777f51f |
line wrap: on
line diff
--- a/pkg/mesh/triangulation.go Sat Aug 21 15:01:52 2021 +0200 +++ b/pkg/mesh/triangulation.go Mon Sep 20 17:45:39 2021 +0200 @@ -20,9 +20,9 @@ package mesh import ( - "log" "math" + "gemma.intevation.de/gemma/pkg/log" "gonum.org/v1/gonum/stat" ) @@ -115,7 +115,7 @@ var newCandidates []int32 - log.Printf("info: candidates: %d\n", len(candidates)) + log.Infof("candidates: %d\n", len(candidates)) for len(candidates) > 0 { oldRemoved := len(removed) @@ -137,9 +137,9 @@ newCandidates = newCandidates[:0] } - log.Printf("info: candidates left: %d\n", len(candidates)) - log.Printf("info: triangles: %d\n", len(t.Triangles)/3) - log.Printf("info: triangles to remove: %d\n", len(removed)) + log.Infof("candidates left: %d\n", len(candidates)) + log.Infof("triangles: %d\n", len(t.Triangles)/3) + log.Infof("info: triangles to remove: %d\n", len(removed)) type edge struct { a, b int32 @@ -213,11 +213,11 @@ } if len(open) > 0 { - log.Printf("warn: open vertices left: %d\n", len(open)) + log.Warnf("open vertices left: %d\n", len(open)) } if len(rings) == 0 { - log.Println("warn: no ring found") + log.Warnln("no ring found") return nil, removed } @@ -234,7 +234,7 @@ polygon = append(polygon, t.Points[rings[0].a]) - log.Printf("length of boundary: %d\n", len(polygon)) + log.Infof("length of boundary: %d\n", len(polygon)) return polygon, removed }