Skip to content

Commit

Permalink
add: logging for ipv4 or ipv6 disabling
Browse files Browse the repository at this point in the history
  • Loading branch information
CorentinB committed Sep 24, 2024
1 parent 15fb32d commit 094c330
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions internal/pkg/crawl/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,7 @@ func GenerateCrawlConfig(config *config.Config) (*Crawl, error) {
}

c.UserAgent = "Mozilla/5.0 (compatible; archive.org_bot +http://archive.org/details/archive.org_bot) Zeno/" + version.Version + " warc/" + version.WarcVersion
c.Log.Info("User-Agent set to", "user-agent", c.UserAgent)
}
c.Headless = config.Headless

Expand All @@ -286,6 +287,10 @@ func GenerateCrawlConfig(config *config.Config) (*Crawl, error) {

if c.DisableIPv4 && c.DisableIPv6 {
c.Log.Fatal("Both IPv4 and IPv6 are disabled, at least one of them must be enabled.")
} else if c.DisableIPv4 {
c.Log.Info("IPv4 is disabled")
} else if c.DisableIPv6 {
c.Log.Info("IPv6 is disabled")
}

// Crawl HQ settings
Expand Down

0 comments on commit 094c330

Please sign in to comment.