Disabling logs support added.
This commit is contained in:
parent
b973c1c064
commit
7abc7a370d
@ -12,6 +12,7 @@ Geziyor is a blazing fast web crawling and web scraping framework, used to crawl
|
||||
- Request Delays (Constant/Randomized)
|
||||
- Automatic response decoding to UTF-8
|
||||
|
||||
See scraper [Options](https://godoc.org/github.com/geziyor/geziyor#Options) for customization.
|
||||
|
||||
## Usage
|
||||
Simplest usage
|
||||
@ -53,4 +54,5 @@ geziyor.Start()
|
||||
|
||||
go get github.com/geziyor/geziyor
|
||||
|
||||
We highly recommend you to use go modules. As this project is in **development stage** right now.
|
||||
## Status
|
||||
We highly recommend you to use go modules. As this project is in **development stage** right now and **API is not stable**.
|
||||
|
@ -62,6 +62,9 @@ func NewGeziyor(opt Options) *Geziyor {
|
||||
if opt.UserAgent == "" {
|
||||
geziyor.opt.UserAgent = "Geziyor 1.0"
|
||||
}
|
||||
if opt.LogDisabled {
|
||||
log.SetOutput(ioutil.Discard)
|
||||
}
|
||||
|
||||
return geziyor
|
||||
}
|
||||
|
@ -37,4 +37,7 @@ type Options struct {
|
||||
RequestDelay time.Duration
|
||||
// RequestDelayRandomize uses random interval between 0.5 * RequestDelay and 1.5 * RequestDelay
|
||||
RequestDelayRandomize bool
|
||||
|
||||
// Disable logging by setting this true
|
||||
LogDisabled bool
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user