From 094c3306698e6c9573e4f56c64e89eae64cc25e0 Mon Sep 17 00:00:00 2001 From: Corentin Barreau Date: Tue, 24 Sep 2024 10:46:35 +0200 Subject: [PATCH] add: logging for ipv4 or ipv6 disabling --- internal/pkg/crawl/config.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/internal/pkg/crawl/config.go b/internal/pkg/crawl/config.go index 1dc1f45b..716b76f9 100644 --- a/internal/pkg/crawl/config.go +++ b/internal/pkg/crawl/config.go @@ -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 @@ -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