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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
[馃悰 Bug]: .NET LogFileHandler not writing any logs #13839
Comments
@MJB222398, thank you for creating this issue. We will troubleshoot it as soon as we can. Info for maintainersTriage this issue by using labels.
If information is missing, add a helpful comment and then
If the issue is a question, add the
If the issue is valid but there is no time to troubleshoot it, consider adding the
If the issue requires changes or fixes from an external project (e.g., ChromeDriver, GeckoDriver, MSEdgeDriver, W3C),
add the applicable
After troubleshooting the issue, please add the Thank you! |
This issue is logical issue. Currently, each @MJB222398, As a workaround I can propose to initiate new webdriver in using (var logContext = ...)
{
var driver = new ...
} It is not a solution, selenium library should resolve it. |
@nvborisenko Thanks for your answer, yes I can see doing as suggested will produce the expected logs. I can also do this:
Which I I think is what you are saying you would expect. Unrelated, I would like to be able to pass in a |
The aim is your original piece of code should work, you use the logging correctly. Unrelated, I think it is good idea to introduce some basic features out of the box in core project like overwriting file instead of appending. Please post new issue to track it separately. |
@nvborisenko while I was able to get it to work with the reduced code above I am still having trouble getting it to actually work in my complete production ready solution. Spent 4 hours trying to see the problem, I shall retire for now and look into that again tomorrow and report back to you. I will raise a separate issue for the file overwriting yes |
@nvborisenko Ok, figured it out, the logging context does not work if I create it in an asynchronous method. I have raised #13859 for this. Also raised #13860 for the file overwriting feature |
What happened?
I want to use the FileLogHandler to write out driver logs to the filesystem. When I try this I see the log file gets created on disc but nothing is ever written to it.
How can we reproduce the issue?
Relevant log output
Operating System
Windows 10
Selenium version
4.19.0
What are the browser(s) and version(s) where you see this issue?
All
What are the browser driver(s) and version(s) where you see this issue?
All
Are you using Selenium Grid?
I am: 4.18.0-20240220
The text was updated successfully, but these errors were encountered: