Open nirhp opened 6 years ago
What you see in this log file is the expected output with the default configuration. We have some ideas on how to make it less chatty which you can read more about in https://bugzilla.mozilla.org/show_bug.cgi?id=1399441.
Is there a way to turn off this expected output?
Yes, by redirecting the stdout and stderr to a /dev/null.
For the browser? I tried
var firefoxOptions = new FirefoxOptions() { }; firefoxOptions.AddArgument("> NUL");
but it does not work.
Not sure what language that is, but I don’t think shell commands, or redirections, is supported through arguments.
turn off driver logs for JAVA: ffProfile.setPreference("webdriver.log.driver", "OFF"); System.setProperty(FirefoxDriver.SystemProperty.BROWSER_LOGFILE, "/dev/null");
@Tomm254 , It didn't work for me:
firefoxOptions.Profile.SetPreference("webdriver.log.driver", "OFF");
Environment.SetEnvironmentVariable("webdriver.firefox.logfile", "/dev/null");
@andreastt I'm using C#. I there a way to pass redirection for the browser through Selenium?
@nirhp Alas I don’t know any of the Selenium bindings well.
I have submitted https://bugzilla.mozilla.org/show_bug.cgi?id=1384956 to patch the debug-logs-always-on problem.
raised Selenium bug https://github.com/SeleniumHQ/selenium/issues/5129 as this is really their issue for just letting it flow through.
FWIW I don‘t think this will be so much of an issue once https://bugzilla.mozilla.org/show_bug.cgi?id=1399441 is fixed. I would propose holding off https://github.com/SeleniumHQ/selenium/issues/5129.
The selenium bug is orthogonal. If a new driver comes online then the bindings should do a better job of managing output from drivers
@nirhp, given the attached log as port of your first comment on this issue the extension logging is enabled. Do you know where the preference extensions.logging.enabled
is getting set to true
? This should not be the case for default profiles as created by geckodriver. So maybe your webdriver client is automatically enabling those?
System
Testcase
Expected behavior
Job output console will not contain Selenium / Firefox / Geckodriver logs.
Actual behavior
The Jenkins job console output contains a lot of logging output (jobOutput.txt attached bellow). jobOutput.txt