diff pkg/mesh/raster.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 1a89084163d5
children 1222b777f51f
line wrap: on
line diff
--- a/pkg/mesh/raster.go	Sat Aug 21 15:01:52 2021 +0200
+++ b/pkg/mesh/raster.go	Mon Sep 20 17:45:39 2021 +0200
@@ -14,7 +14,6 @@
 package mesh
 
 import (
-	"log"
 	"math"
 	"runtime"
 	"sync"
@@ -23,6 +22,7 @@
 	"github.com/fogleman/contourmap"
 
 	"gemma.intevation.de/gemma/pkg/common"
+	"gemma.intevation.de/gemma/pkg/log"
 	"gemma.intevation.de/gemma/pkg/wkb"
 )
 
@@ -40,12 +40,12 @@
 
 	width, height := bbox.Size()
 
-	log.Printf("info raster extent: %.2f / %.2f", width, height)
+	log.Infof("raster extent: %.2f / %.2f", width, height)
 
 	xCells := int(math.Ceil(width / cellSize))
 	yCells := int(math.Ceil(height / cellSize))
 
-	log.Printf("info raster size: %d / %d\n", xCells, yCells)
+	log.Infof("raster size: %d / %d\n", xCells, yCells)
 
 	size := (xCells + 2) * (yCells + 2)
 	cells := make([]float64, size)
@@ -231,7 +231,7 @@
 	close(cnts)
 
 	wg.Wait()
-	log.Printf("info: Tracing areas took %v\n", time.Since(start))
+	log.Infof("Tracing areas took %v\n", time.Since(start))
 
 	return areas
 }
@@ -362,7 +362,7 @@
 		forest.insertRoot(contour(cnt))
 	}
 
-	//log.Printf("cnts: %d roots: %d\n", len(cnts), len(bf.roots))
+	//log.Debugf("cnts: %d roots: %d\n", len(cnts), len(bf.roots))
 
 	var mp wkb.MultiPolygonGeom