summaryrefslogtreecommitdiff
path: root/crawler/post_process.go
diff options
context:
space:
mode:
authorhorus2018-02-16 16:57:10 +0100
committerhorus2018-02-16 16:57:39 +0100
commited6ab4da59f80bf9fa2cbf15da5c9167dff44ea4 (patch)
tree1038ab5d9b2a0b9bde5ee021624fa87422b705f8 /crawler/post_process.go
parentb131ce750740ddb9c47515727327c06aa0d22aad (diff)
downloadalkobote-ed6ab4da59f80bf9fa2cbf15da5c9167dff44ea4.tar.gz
Adds structured logging. (crawler)
Diffstat (limited to 'crawler/post_process.go')
-rw-r--r--crawler/post_process.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/crawler/post_process.go b/crawler/post_process.go
index e527911..dfd7861 100644
--- a/crawler/post_process.go
+++ b/crawler/post_process.go
@@ -2,9 +2,10 @@ package main
import (
"io/ioutil"
- "log"
"net/http"
"net/url"
+
+ log "github.com/Sirupsen/logrus"
)
func (app *App) post_process() error {
@@ -37,7 +38,7 @@ func (app *App) short_url() error {
polr_url := app.Config.Polr_URL + "?" + v.Encode()
if app.Config.Debug {
- log.Println("DEBUG: polr_url: " + polr_url + " ( " + offer_db.Url + " )")
+ log.Debug("polr_url: " + polr_url + " ( " + offer_db.Url + " )")
}
resp, err := http.Get(polr_url)
if err != nil {
@@ -52,7 +53,7 @@ func (app *App) short_url() error {
offer_db.Short_url = string(short_url)
if app.Config.Debug {
- log.Println("DEBUG: short_url: " + string(short_url) + " ( " + offer_db.Url + " )")
+ log.Debug("short_url: " + string(short_url) + " ( " + offer_db.Url + " )")
}
Angebote = append(Angebote, offer_db)