Reputation: 5684
I am developing a tool using selenium chrome web driver. That should display only the result on the console. But during initialization it print some error logs. My problem is to how to remove these logs.
WebDriver driver=new InternetExplorerDriver();
In this case it is showing the log
Started InternetExplorerDriver server (32-bit)
2.24.2.0
Listening on port 41437
And for the chrome
WebDriver driver =new ChromeDriver();
And the log is
Started ChromeDriver
port=42458
version=21.0.1180.4
log=G:\Workspace_Selenium\WebTestSelenium_ToResolveTheReview\chromedriver.log
Looking for help
Upvotes: 4
Views: 2218
Reputation: 38424
If you're not using any kind of logging other than the console (or manage it yourself), then
Logger shutUp = Logger.getLogger("");
shutUp.setLevel(Level.WARNING);
does the job. That should only output warnings. You can, of course, use Level.SEVERE
to make it only output errors or even Level.OFF
to be absolutely quiet.
Upvotes: 1