1
0
Fork 0
mirror of https://github.com/Luzifer/gpxhydrant.git synced 2024-12-22 20:21:17 +00:00

Added more debugging output

This commit is contained in:
Knut Ahlers 2016-05-07 14:15:38 +02:00
parent ae02981234
commit 0de60d94a7
Signed by: luzifer
GPG key ID: DC2729FDD34BE99E

10
main.go
View file

@ -239,6 +239,10 @@ func main() {
}
}
if cfg.Debug {
log.Printf("Working on Changeset %d", cs.ID)
}
border := 0.00009 // Equals ~10m using haversine formula
mapData, err := osmClient.RetrieveMapObjects(minLon-border, minLat-border, maxLon+border, maxLat+border)
if err != nil {
@ -274,6 +278,9 @@ func main() {
log.Printf("[NOOP] Would send a create to OSM (Changeset %d): %#v", cs.ID, h.ToNode())
} else {
osmClient.SaveNode(h.ToNode(), cs)
if cfg.Debug {
log.Printf("Created a hydrant: %s", h.Name)
}
}
continue
}
@ -296,6 +303,9 @@ func main() {
log.Printf("[NOOP] Would send a change to OSM (Changeset %d): To=%#v From=%#v", cs.ID, h.ToNode(), found.ToNode())
} else {
osmClient.SaveNode(h.ToNode(), cs)
if cfg.Debug {
log.Printf("Changed a hydrant: %s", h.Name)
}
}
}
}