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

Clarify Java logging #3103

Open
Open
@lukeis

Description

@lukeis

Originally reported on Google Code with ID 3103

Hi,

I'm using Selenium 2.15.0 and I have some difficulties to obtain a consistent logging
behavior. Some parts of Selenium (HtmlUnit dependencies) are using commons-logging,
while RemoteWebDriver in selenium-remote-driver use a JUL (java.util.logging) logger.

I can easily redirect commons-logging to slf4j using jcl-over-slf4j, then use the logging
framework of my choice, but it is much harder to redirect JUL as it is a base class
of the JDK (read http://www.slf4j.org/legacy.html#jul-to-slf4j).

Would you mind removing the use of JUL in RemoteWebDriver? It seems to be the only
place where logging is used anyway. In addition the method RemoteWebDriver#setLogLevel
is very strange because IMHO setting log level should be done from the outside of the
application (property or config file).
If you really need to log I suggest to define a single choice for all Selenium modules
+ dependencies and use an interface that allow to switch the implementation (use slf4j
or a custom interface if you like). Then add correct exclusions in poms to not have
commons-logging as a transitive dependency.

Thanks

Reported by glaurung.aubrane on 2011-12-21 14:53:00

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions