geocode: move logging

Change-Id: I42d901510f9d8085c29792fd6b7ea8e1dc082c06
This commit is contained in:
Brad Fitzpatrick 2013-12-24 13:43:25 -08:00
parent f053007954
commit f8d9e6663d
2 changed files with 2 additions and 1 deletions

View File

@ -20,6 +20,7 @@ package geocode
import (
"encoding/json"
"io"
"log"
"net/http"
"net/url"
"sync"
@ -64,6 +65,7 @@ func Lookup(ctx *context.Context, address string) ([]Rect, error) {
}
defer res.Body.Close()
rects, err := decodeGoogleResponse(res.Body)
log.Printf("Google geocode lookup (%q) = %#v, %v", address, rects, err)
if err == nil {
mu.Lock()
cache[address] = rects

View File

@ -186,7 +186,6 @@ func parseExpression(ctx *context.Context, exp string) (*SearchQuery, error) {
if strings.HasPrefix(word, "loc:") {
where := strings.TrimPrefix(word, "loc:")
rects, err := geocode.Lookup(ctx, where)
log.Printf("Geocode lookup for %q: %#v", where, rects)
if err != nil {
return nil, err
}