changeset 2547:5afca5bc1d7a

Cross profile endpoint: Normalized logging.
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Thu, 07 Mar 2019 18:05:20 +0100
parents bf4a884fc306
children 6b34d0fb4498
files pkg/controllers/cross.go
diffstat 1 files changed, 6 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/pkg/controllers/cross.go	Thu Mar 07 17:52:41 2019 +0100
+++ b/pkg/controllers/cross.go	Thu Mar 07 18:05:20 2019 +0100
@@ -80,7 +80,7 @@
 		ctx, conn,
 		csi.Properties.Bottleneck, csi.Properties.Date.Time)
 
-	log.Printf("loading octree took: %s\n", time.Since(start))
+	log.Printf("info: loading octree took %s\n", time.Since(start))
 	if err != nil {
 		return
 	}
@@ -112,7 +112,7 @@
 
 	coords, err := reproject(ctx, rp, csi.Geometry.Coordinates)
 
-	log.Printf("transforming input coords took: %s\n", time.Since(start))
+	log.Printf("info: transforming input coords took %s\n", time.Since(start))
 	if err != nil {
 		return
 	}
@@ -135,16 +135,16 @@
 		})
 
 		if len(line) > 0 {
-			log.Printf("line length: %d\n", len(line))
+			log.Printf("info: 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("joined length: %d\n", len(joined))
+			log.Printf("info: joined length: %d\n", len(joined))
 			segments = append(segments, joined...)
 		}
 
 	}
-	log.Printf("octree traversal took: %s\n", time.Since(start))
+	log.Printf("info: octree traversal took %s\n", time.Since(start))
 
 	start = time.Now()
 
@@ -155,7 +155,7 @@
 		conn,
 	)
 
-	log.Printf("projecting back took: %s\n", time.Since(start))
+	log.Printf("info: projecting back took %s\n", time.Since(start))
 	if err != nil {
 		return
 	}