0

I'm trying to understand locust log levels. Why am I only seeing this in DEBUG output?

[2024-05-06 15:25:54,465] e9d5c4e3e3eb/DEBUG/selenium.webdriver.remote.remote_connection: Remote response: status=404 | data={"value":{"error":"no such element","message":"no such element: Unable to locate element: {\"method\":\"css selector\",\"selector\":\"[id=\"dash_listener\"]\"}\n  (Session info: chrome-headless-shell=124.0.6367.91)","stacktrace":"#0 ........ 

It's hard to debug with all the non error or warn level debug output.

Can I tell locust that 404s are warnings or errors so I can get cleaner output when troubleshooting?

5
  • How are you calling selenium? Are you using locust-plugins or something else? Commented May 6, 2024 at 16:38
  • Yes I'm using this pypi.org/project/realbrowserlocusts which calls selenium.webdriver. Is there a way to globally configure selenium logging for specific calls like this? So a 404 results in a "ERROR" or "WARNING" log? Commented May 6, 2024 at 17:16
  • That project seems really old. I’d probably recommend github.com/SvenskaSpel/locust-plugins/blob/master/examples/… instead (I’m not actively maintaining that, but at least it isnt 7 years old :) Commented May 6, 2024 at 21:25
  • But how do I get control over the logging of selenium? Does the plugin have to be modified or can you modify the logging of the selenium package globally? Commented May 6, 2024 at 21:39
  • Sorry, I cant speak for realbrowserlocusts at all. with locust-plugins/WebdriverUser a regular locust request event is fired for every call to locust_find_element Commented May 7, 2024 at 11:11

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.