-
-
Notifications
You must be signed in to change notification settings - Fork 8.5k
[🐛 Bug]: [dotnet] Selenium Library should never write to my console #15785
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
Comments
@nvborisenko, thank you for creating this issue. We will troubleshoot it as soon as we can. Selenium Triage Team: remember to follow the Triage Guide |
Please verify that this issue still occurs with the latest version. If it no longer applies, you can close this issue or update your comment. This issue will be marked "awaiting answer" and may be closed automatically if no response is received. |
Hi bot! Nice to see you here, go away! |
I can't speak for other bindings, but in Python the default level is WARNING. All of our logging is done at DEBUG level, so it is never shown unless you enable it. |
In .NET we have default This Bug/FeatureRequest is about it: it seems strange that library outputs something to my stderr by default. Selenium is a library, it is not an application. I don't mind that library may output something, but I should explicitly allow it. I propose to turn off this behavior by default. |
I think you should implement it in .NET because .NET did not have any logging for a long time. I wonder why logging started with Java is too verbose sometimes but I believe users are familiar with this and changing it might be a "breaking" change for them. |
Many years ago Selenium/.NET did not provide logging capabilities. But there is a possibility to subscribe on Now we have centralized logging mechanism, especially designed for logging purposes. Default level is aligned with other bindings (output Summary: OpenQA.Selenium.Internal.Logging.Log.SetLevel(LogEventLevel.Trace); // any level he wants |
@RenderMichael @YevgeniyShunevych what do think about this issue? |
I understand and support your concern about "any library should not output to user's console" by default. But in terms of consistency, I would also consider the common behavior across different WebDriver language bindings. If other language bindings write warnings and errors by default to console output, and there is a general agreement on this, so let it be for .NET as well. If there is no "general agreement"/"common approach" for default logging configuration, it may be disabled. |
It was sort of agreement: https://www.selenium.dev/documentation/webdriver/troubleshooting/logging/, .NET did not want to be some special case. BTW logging in JavaScript is off by default. I don't have strong opinion, just don't like that library puts something to my console. From other point of view I see |
Uh oh!
There was an error while loading. Please reload this page.
Description
I have my own application, let's say console application. I use many libraries to achieve my goal. No one is writing to console, except I explicitly allow to do it.
https://www.selenium.dev/documentation/webdriver/troubleshooting/logging/
The default logging level is
Info
.Reproducible Code
The text was updated successfully, but these errors were encountered: