How SuppressInitialDiagnosticInformation = true works with chromedriver in JAVA - Disable Logs

422 views
Skip to first unread message

garvitag...@gmail.com

unread,
Jul 17, 2018, 4:01:12 AM7/17/18
to Selenium Users
Hi,

I am trying to eliminate log of chromedriver .

Jul 17, 2018 7:50:40 AM org.openqa.selenium.remote.ProtocolHandshake createSession
INFO: Detected dialect: OSS


I do not want this to be printed. Tried multiple solutions like:
1.  ChromeOptions options = new ChromeOptions();
options.addArguments("--disable-logging");
options.addArguments("--silent");
options.addArguments("--log-level=3")

2. Found this property SuppressInitialDiagnosticInformation, but it does not work with java. https://stackoverflow.com/questions/18702533/how-to-execute-selenium-chrome-webdriver-in-silent-mode/34519284#34519284
When i imported class ChromeDriverService, there is no such property like SupressInitialDiagnosticInfo.

3. driver = new ChromeDriver(new ChromeDriverService.Builder().withSilent(true).build(),options);

Nothing is working out, please help with this.

Thanks !!

⇜Krishnan Mahadevan⇝

unread,
Jul 17, 2018, 4:13:06 AM7/17/18
to Selenium Users
That line viz., Detected dialect: OSS 

is not coming from chromedriver binary, but its coming from the Selenium Java bindings. Notice how it says INFO level.

You would need to basically figure out how to disable INFO level logs from the Java bindings and bump it to show only perhaps WARNING.


Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribblings @ http://rationaleemotions.wordpress.com/

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-users+unsubscribe@googlegroups.com.
To post to this group, send email to selenium-users@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/d19cc436-e6db-43d6-a964-508219655028%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

garvitag...@gmail.com

unread,
Jul 17, 2018, 5:35:15 AM7/17/18
to Selenium Users
Thanks for direction !!

it worked by adding java.util.logging.Logger.getLogger("org.openqa.selenium").setLevel(Level.OFF);.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages