From 354eb02340c1f0a50b9c61155136c5e269126ae8 Mon Sep 17 00:00:00 2001 From: Chandler Swift Date: Mon, 18 Oct 2021 18:55:36 -0500 Subject: [PATCH] Put selenium debugging behind a switch --- main.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main.go b/main.go index d3289f9..d4afad1 100644 --- a/main.go +++ b/main.go @@ -130,6 +130,7 @@ func main() { serve := flag.Bool("serve", false, "Serve HTTP rather than writing a file") filename := flag.String("path", "index.html", "Output filename (if -serve=false, default)") port := flag.Int("port", 8080, "Port to serve on") + debug := flag.Bool("debug", false, "Enable debug logging for the selenium package") largest := flag.Int("largest", 50, "largest n for {n}hats.com") flag.Parse() @@ -142,7 +143,7 @@ func main() { selenium.StartFrameBuffer(), selenium.Output(nil), } - selenium.SetDebug(true) + selenium.SetDebug(*debug) service, err := selenium.NewGeckoDriverService(geckoDriverPath, geckoDriverPort, opts...) if err != nil {