Skip to content
This repository has been archived by the owner on Nov 29, 2018. It is now read-only.

How to disable the diagnostic messages from InternetExplorer Driver? #4287

Closed
lukeis opened this issue Mar 3, 2016 · 10 comments
Closed

How to disable the diagnostic messages from InternetExplorer Driver? #4287

lukeis opened this issue Mar 3, 2016 · 10 comments

Comments

@lukeis
Copy link
Member

lukeis commented Mar 3, 2016

Originally reported on Google Code with ID 4287

Hello,

How one can disable the logging messages that are printed to STDERR from InternetExplorerDriver?


I'm talking about this text: http://pastie.org/4289466

Note the "Started InternetExplorerDriver server (32-bit)", "2.25.1.0", "20.07.2012
15:58:10 org.apache.http.impl.client.DefaultRequestDirector tryExecute" - all these
is printed to STDERR and I'd like to suppress these messages.

What I've tried (rhino script):
        var loggingPrefs    = new org.openqa.selenium.logging.LoggingPreferences();

        loggingPrefs.enable(org.openqa.selenium.logging.LogType.DRIVER, java.util.logging.Level.OFF);

        var capabilities    = new org.openqa.selenium.remote.DesiredCapabilities();
        capabilities.setCapability(org.openqa.selenium.remote.CapabilityType.LOGGING_PREFS,
loggingPrefs)
//        capabilities.setCapability('loggingPrefs', java.util.logging.Level.OFF)

        var driver          = new driverClass(capabilities)

This doesn't seems to help.. Consulting the wiki docs and #selenium channel also didn't
help.

Please advise, thanks, Nickolay

Reported by nickolay8 on 2012-07-20 11:59:42

@lukeis
Copy link
Member Author

lukeis commented Mar 3, 2016

Hi,

>Started InternetExplorerDriver server (32-bit)
>2.25.1.0
>Listening on port 39870

As i understand, these messages can not be disabled w/o changing code of IEDriverServer.
They always printed to stderr.

Another messages, i think, are from client binding logger. But i don't know LoggingPreferences
is supported or not to disable these.

Reported by a.u.savchuk on 2012-07-20 13:05:08

@lukeis
Copy link
Member Author

lukeis commented Mar 3, 2016

Shouldn't there be a setting to disable those messages? Printing logging info to STDERR
is good for development, but not for production.

Reported by nickolay8 on 2012-07-20 18:49:36

@lukeis
Copy link
Member Author

lukeis commented Mar 3, 2016

Reported by barancev on 2012-07-21 16:42:07

  • Labels added: Component-WebDriver, Browser-IE

@lukeis
Copy link
Member Author

lukeis commented Mar 3, 2016

To disable log messages from http client (org.apache.http.impl.client):

java.util.logging.Logger.getLogger("org.apache.http.impl.client").setLevel(java.util.logging.Level.WARNING);

We'll discuss if it is worth to add this instruction in the Selenium code, or leave
it to the users.

Reported by barancev on 2012-07-22 08:57:06

  • Labels removed: Status-Untriaged

@lukeis
Copy link
Member Author

lukeis commented Mar 3, 2016

Hi,

i see there are 2 issues:
1. disabling messages like "Started InternetExplorerDriver server (32-bit)" - it is
implemented at c4d30388d5d1 revision - now it's possible to use "silent" capability
for disabling such startup messages.
2. disabling logging from http client - workaround is described at @4

So this issue now is about disabling logging from http client only.

Reported by a.u.savchuk on 2013-04-30 08:51:04

@lukeis
Copy link
Member Author

lukeis commented Mar 3, 2016

Also for java http client you can use multiple aproaches. please read [1]

[1] http://hc.apache.org/httpcomponents-client-ga/logging.html

From my point of view the issue is already fixed.

Reported by a.u.savchuk on 2013-05-08 08:19:23

@lukeis
Copy link
Member Author

lukeis commented Mar 3, 2016

All logging described in initial problem can be disabled using java nd selenium configuration.

Reported by a.u.savchuk on 2013-07-20 20:16:02

  • Status changed: Fixed

@lukeis
Copy link
Member Author

lukeis commented Mar 3, 2016

Can you provide an example please? (I'm not a Java expert)

Reported by nickolay8 on 2013-07-22 05:26:42

@lukeis
Copy link
Member Author

lukeis commented Mar 3, 2016

See comment #4

Reported by barancev on 2013-07-22 08:36:46

@lukeis
Copy link
Member Author

lukeis commented Mar 3, 2016

Reported by luke.semerau on 2015-09-17 18:15:52

  • Labels added: Restrict-AddIssueComment-Commit

@lukeis lukeis closed this as completed Mar 3, 2016
@SeleniumHQ SeleniumHQ locked and limited conversation to collaborators Mar 4, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant