-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
[java] Avoid logging debug logs with INFO level (either in RUN or DEBUG mode) #16584
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
base: trunk
Are you sure you want to change the base?
Conversation
PR Compliance Guide 🔍Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label |
||||||||||||||||||||||||
PR Code Suggestions ✨Explore these optional code suggestions:
|
|||||||||
... either in RUN or DEBUG mode. People do debug their tests, and they don't want to see Selenium own debug logs. Especially DevTools/BiDi logs which are huge (encoded Base64 data, incl. screenshots etc).
c1df8d4 to
eb53b7e
Compare
User description
People do debug their tests, and they don't want to see Selenium own debug logs. Especially DevTools/BiDi logs which are huge (encoded Base64 data, incl. screenshots etc).
🔗 Related Issues
When i debug my UI tests, I see unneeded debugging info in my logs:
💥 What does this PR do?
Change method
Debug.isDebugging(), so that it doesn't depend on "RUN" or "DEBUG" JVM mode.Now the debug logs can only be implicitly turned on.
💡 Additional Considerations
With a great pleasure, I would remove
Debug.javaat all.These logs should be always written with TRACE level.
When someone needs these logs, he should just set
TRACElogging level for packageorg.openqa.selenium.bidiororg.openqa.selenium.devtools.🔄 Types of changes
PR Type
Bug fix
Description
Remove JVM debug mode detection from
Debug.isDebugging()Prevent DevTools/BiDi debug logs appearing at INFO level
Only allow explicit debug enablement via system properties
Users can enable TRACE logging for specific packages instead
Diagram Walkthrough
File Walkthrough
Debug.java
Remove automatic JVM debug mode detectionjava/src/org/openqa/selenium/internal/Debug.java
ManagementFactoryimport and JVM debug flag detection-agentlib:jdwpin runtime argumentsselenium.debugandselenium.webdriver.verbose)IS_DEBUGinitialization logic