Added custom logger. Right now, not configurable.
This commit is contained in:
@ -2,7 +2,7 @@ package middleware
|
||||
|
||||
import (
|
||||
"github.com/geziyor/geziyor/client"
|
||||
"log"
|
||||
"github.com/geziyor/geziyor/internal"
|
||||
)
|
||||
|
||||
// LogStats logs responses
|
||||
@ -13,6 +13,6 @@ type LogStats struct {
|
||||
func (p *LogStats) ProcessResponse(r *client.Response) {
|
||||
// LogDisabled check is not necessary, but done here for performance reasons
|
||||
if !p.LogDisabled {
|
||||
log.Printf("Crawled: (%d) <%s %s>", r.StatusCode, r.Request.Method, r.Request.URL.String())
|
||||
internal.Logger.Printf("Crawled: (%d) <%s %s>", r.StatusCode, r.Request.Method, r.Request.URL.String())
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user