Image(s): node-chrome, node-firefox
Docker Version: 1.12.1
Able to change the logging level of the node via environment variables.
Cannot change the logging level of the node via environment variables.
The selenium nodes are very noisy out of the box, particularly node-firefox which appears to default to DEBUG level logging. I would like to be able to turn the logging level of the nodes down to WARN or similar as I'm running inside docker-compose and the logging from the nodes is drowning out the logging from my application under test and my tests, both of which have much more important things to say.
Touche. It makes it extremely difficult to parse what testing is actually happening on the node.
@MicahZoltu does this requirement include change Firefox geckodriver log level ?
Recently, I found some issue, geckodriver developer always asked about trace-level logging like this
geckodriver by passing -vv to it or configuring the {"moz:firefoxOptions": {"log": {"level": "trace"}}} capability.
@HackToday I'm not sure where exactly the log output is coming from. Where would I add the {"moz:firefoxOptions": {"log": {"level": "trace"}}} to see if that helps with reducing the log level? At the moment, I'm launching all through docker-compose using the publicly hosted docker images, so I don't have any configuration files for selenium/hub or selenium/node-firefox. I do have a nightwatch.json for the test-client side interactions, could it go there?
Hi @MicahZoltu The geckodrver docs info like that
https://github.com/mozilla/geckodriver#capabilities-examples
@MicahZoltu - perhaps the logging you are referring to are the selenium-server logs that are generated by the HUB and not the browser. @HackToday is suggesting to change the browser capabilities; its unlikely the noise would discontinue.
@pratiks Selenium hub is also noisy, but this issue is specifically for the nodes themselves. @HackToday I attempted to drop those capabilities into my capabilities JSON but it resulted in an error complaining about it being "not a FirefoxOption".
I am using the standalone containers and the JAVA_OPTS environment variable to silence the containers.
JAVA_OPTS=-Dselenium.LOGGER.level=WARNING
In regards to @luksurious suggestion, has anyone been able to utilize that approach with hub+nodes? I've not yet had success. Currently using the following commands:
docker run -d --name automationHub -p 4444:4444 -e JAVA_OPTS="-Dselenium.LOGGER.level=WARNING" selenium/hub
docker run -d --name automationNode --link automationaHub:hub -e JAVA_OPTS="-Dselenium.LOGGER.level=WARNING" selenium/node-chrome
Hub and node both spin up fine, but continue to output DEBUG level logs.
@luksurious I still got Marionette DEBUG messages and geckodriver INFO messages. Do you know how to silence them? Otherwise my logs get overwhelmed....
Marionette DEBUG Register listener.js for window 2147483649
geckodriver INFO geckodriver 0.19.0
Who can share example how to set the log level in nodejs ?
Throwing my hat in the ring. Chrome is splooshing all over my docker-compose up output - drowning the much much more important lines from my web app and database.
@luksurious' solution unfortunately does not work for me.
I feel that the default log level shouldn't be DEBUG regardless.
Any reason why JAVA_OPTS="-Dselenium.LOGGER.level=INFO" or any other logger level (ALL, FINE, etc.) doesn't work with hub and nodes? I'm primarily interested in nodes. My docker is running selenium-server-standalone version 3.11.0. When I run 3.4.0 standalone then I can switch between the different logger levels.
Maybe not the same detail as before, but I added the following and I was able to get more verbose logging.
-Dwebdriver.chrome.verboseLogging=true
The main reason for the high logging in the node containers (also the standalone ones) is that all the output from xvfb and x11vnc is mixed with the node output. We are in the process of adding supervisor to handle processes differently, and therefore each process will have its own logging. With that this issue will be solved.
Fixed on this release https://github.com/SeleniumHQ/docker-selenium/releases/tag/3.14.0-francium
Any other logging configuration can be tuned through the JAVA_OPTS env var.
Most helpful comment
I am using the standalone containers and the
JAVA_OPTSenvironment variable to silence the containers.JAVA_OPTS=-Dselenium.LOGGER.level=WARNING