Added custom logger. Right now, not configurable.

This commit is contained in:
Musab Gültekin
2021-04-13 23:36:42 +03:00
parent 129402d754
commit e3d79e2574
10 changed files with 39 additions and 32 deletions

View File

@ -4,7 +4,7 @@ import (
"bytes"
"github.com/PuerkitoBio/goquery"
"github.com/geziyor/geziyor/client"
"log"
"github.com/geziyor/geziyor/internal"
)
// ParseHTML parses response if response is HTML
@ -16,7 +16,7 @@ func (p *ParseHTML) ProcessResponse(r *client.Response) {
if !p.ParseHTMLDisabled && r.IsHTML() {
doc, err := goquery.NewDocumentFromReader(bytes.NewReader(r.Body))
if err != nil {
log.Println(err.Error())
internal.Logger.Println(err.Error())
return
}
r.HTMLDoc = doc