about summary refs log tree commit diff
path: root/backend
diff options
context:
space:
mode:
authorEmile <hanemile@protonmail.com>2019-03-08 12:56:16 +0100
committerEmile <hanemile@protonmail.com>2019-03-08 12:56:16 +0100
commit723c17bc2e64fc24dcd3f412d1a685c3f317d2c7 (patch)
tree125f0040c1825f6d93f71804ebaf6d17bd359325 /backend
parent52c6cdb25225ba551fd676ad39dde8ec06e8f101 (diff)
more logging
Diffstat (limited to 'backend')
-rw-r--r--backend/get.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/backend/get.go b/backend/get.go
index b76e738..c339147 100644
--- a/backend/get.go
+++ b/backend/get.go
@@ -400,16 +400,15 @@ func GetListOfStarsTree(database *sql.DB, treeindex int64) []structs.Star2D {
 
 // getRootNodeID gets a tree index and returns the nodeID of its root node
 func getRootNodeID(index int64) int64 {
+	log.Printf("Getting the rootnodeid of the tree with the index %d", index)
 	var nodeID int64
 
-	log.Printf("Preparing query with the root id %d", index)
 	query := fmt.Sprintf("SELECT node_id FROM nodes WHERE root_id=%d", index)
-	log.Printf("Sending query")
 	err := db.QueryRow(query).Scan(&nodeID)
 	if err != nil {
 		log.Fatalf("[ E ] getRootNodeID query: %v\n\t\t\t query: %s\n", err, query)
 	}
-	log.Printf("Done Sending query")
+	log.Printf("Node id of tree with the index %d: %d", index, nodeID)
 
 	return nodeID
 }