diff pkg/mesh/tin.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 4847ac70103a
children 1222b777f51f
line wrap: on
line diff
--- a/pkg/mesh/tin.go	Sat Aug 21 15:01:52 2021 +0200
+++ b/pkg/mesh/tin.go	Mon Sep 20 17:45:39 2021 +0200
@@ -19,9 +19,9 @@
 	"errors"
 	"fmt"
 	"io"
-	"log"
 	"math"
 
+	"gemma.intevation.de/gemma/pkg/log"
 	"gemma.intevation.de/gemma/pkg/models"
 	"gemma.intevation.de/gemma/pkg/wkb"
 )
@@ -56,7 +56,7 @@
 // Shared vertices are identified and referenced by the
 // same index.
 func (t *Tin) FromWKB(data []byte) error {
-	log.Printf("info: data length %d\n", len(data))
+	log.Infof("data length %d\n", len(data))
 
 	r := bytes.NewReader(data)
 
@@ -180,7 +180,7 @@
 		triangles = append(triangles, triangle)
 	}
 
-	log.Printf("info: bbox: [[%f, %f], [%f, %f]]\n",
+	log.Infof("bbox: [[%f, %f], [%f, %f]]\n",
 		min.X, min.Y, max.X, max.Y)
 
 	*t = Tin{
@@ -240,7 +240,7 @@
 	if err != nil {
 		return err
 	}
-	log.Printf("info: vertices %d (%d)\n", len(t.Vertices), len(t.Vertices)*3*8)
+	log.Infof("vertices %d (%d)\n", len(t.Vertices), len(t.Vertices)*3*8)
 
 	if err := binary.Write(
 		w, binary.LittleEndian, uint32(len(t.Triangles))); err != nil {
@@ -264,7 +264,7 @@
 			last = idx
 		}
 	}
-	log.Printf("info: compressed tin indices in bytes: %d (%d)\n",
+	log.Infof("compressed tin indices in bytes: %d (%d)\n",
 		written, 3*4*len(t.Triangles))
 
 	return nil