Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TextReport is not visible (if no slf4j implementation is found in classpath) #1114

Closed
asolntsev opened this issue Apr 13, 2020 · 1 comment
Closed
Assignees
Labels
dependencies Pull requests that update a dependency file feature
Milestone

Comments

@asolntsev
Copy link
Member

The problem

Selenide depends only on slf4j-api.jar and doesn't provide any of slf4j implementations.
Users who are not aware of slf4j specifics just don't see any Selenide logs and don't even know about the problem.

Details

Actually users do see these errors in logs:

SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.

But users don't realise it's somehow connected to Selenide's TextReport.

Solution

I suggest that Selenide should fail if there is not slf4j implementations found in classpath. Giving a clear error message like

java.lang.IllegalStateException: SLF4J is not configured. You will not see any Selenide logs. Please add slf4j-simple.jar, slf4j-log4j12.jar or logback-classic.jar to your classpath.

	at com.codeborne.selenide.Selenide.open(Selenide.java:66)
	at integration.BasicAuthTest.canPassBasicAuth_via_proxy(BasicAuthTest.java:22)

Tell us about your environment

  • Selenide Version: 5.10.0
@asolntsev
Copy link
Member Author

Done in #1115

@asolntsev asolntsev added the dependencies Pull requests that update a dependency file label Dec 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file feature
Projects
None yet
Development

No branches or pull requests

1 participant