How do I get my Selenium Grid Hub log
Asked Answered
R

1

5

I have a selenium grid2 set up on an AWS instance, and I was wondering if there's a way I could view the logs on my local machine?

I understand I can visit: http://MyServerAddress/grid/console and view all of the nodes but I want the actual log. Its a bit of a pain having to remote desktop to the server each time I want to view it.

I was thinking something like http://MyServerAddress/grid/log but alas, it doesnt seem to be an option.

Rickierickman answered 20/1, 2017 at 13:47 Comment(0)
P
9

There's nothing available out of the box. But you can build this on your own.

  • You would first need to enable logging for your Grid and have the logs dumped to a specific folder.
  • You would now need to build a custom Servlet and inject it into the servlet (See here for details on how to do it )
  • Assuming that your servlet is called "HubLogServlet", you should be able to access it via the link http://localhost:4444/grid/admin/HubLogServlet

You can refer to this LogServlet for a sample.

Presidentelect answered 22/1, 2017 at 15:12 Comment(1)
This answers my question. Thanks for this.Rickierickman

© 2022 - 2024 — McMap. All rights reserved.