0

I'm running selenium server via:

java -Dwebdriver.chrome.driver=chromedriver -jar selenium-server-standalone-2.53.1.jar

...and seeing reams of info logs like:

14:24:10.876 INFO - Executing: [new session: Capabilities [{rotatable=true, locationContextEnabled=true, loggingPrefs=org.openqa.selenium.logging.LoggingPreferences@4ebd157c, browserName=chrome, javascriptEnabled=true, handlesAlerts=true, requestOrigins={name=webdriverio, version=4.5.2, url=http://webdriver.io}}]])
14:24:10.885 INFO - Creating a new session for Capabilities [{rotatable=true, locationContextEnabled=true, loggingPrefs=org.openqa.selenium.logging.LoggingPreferences@4ebd157c, browserName=chrome, javascriptEnabled=true, handlesAlerts=true, requestOrigins={name=webdriverio, version=4.5.2, url=http://webdriver.io}}]

What arguments do I need to pass to show WARNING instead of INFO level? Failing that, how do I disable it completely? Redirecting stdout and stderr via 2>&1 doesnt seem to get it.

Allyl Isocyanate
  • 13,306
  • 17
  • 79
  • 130
  • try this `selenium.LOGGER.level` as cmd argument.i didnt test.http://stackoverflow.com/questions/37353002/changing-the-log-level-for-a-selenium-node-running-in-docker – gihan-maduranga Jan 07 '17 at 05:40

2 Answers2

0

What arguments do I need to pass to show WARNING instead of INFO level?

Add following additional arguments to your command

-Dwebdriver.log.enabled=true -Dwebdriver.log.file=logs/webdriver.log -Dwebdriver.log.verbosity=verbose

  • That writes the logs to a file, but doesnt change the log level. I'm still seeing INFO level logs like: `1:21:34.284 INFO - Done: [get text: 5 [[ChromeDriver: chrome...` – Allyl Isocyanate Jan 09 '17 at 19:22
  • 1
    Check [this link] (https://sites.google.com/a/chromium.org/chromedriver/logging) for more details on this. You could start chromedriver " chromedriver.exe --verbose --log-path=chromedriver.log" – user3123535 Jan 10 '17 at 13:20
  • 1
    This seems not to work with selenium-server-standalone-2.42.2.jar. – mvw Jan 30 '18 at 16:10
0

I ended up redirecting selenium logging to a file, which quieted it down stdout significantly:

java -log /tmp/selenium-log -Dwebdriver.chrome.driver=chromedriver -jar selenium-server-standalone-2.53.1.jar  &
Allyl Isocyanate
  • 13,306
  • 17
  • 79
  • 130