Re: Turn off verbose logging of Selenium

1,380 views
Skip to first unread message

Aswini Rajasekaran

unread,
Apr 25, 2013, 11:33:54 AM4/25/13
to seleniu...@googlegroups.com
Did anyone get a chance to have a look at my question?

Aswini

On Wednesday, 24 April 2013 12:42:12 UTC+1, Aswini Rajasekaran wrote:
Hi all,
I am using 2.0.31 version of selenium jar and run it in unix like this, java -jar selenium.jar -userextensions - htmlSuite -port -timeout -log.
When I run this in Jenkins, the output of selenium is huge like below.

<a href="xxxxx.html">xxxxxx</a></td></tr>

<tr class="status_passed"><td>
xxxxx.html
<a href="xxxxx.htmll">xxxxxx</a></td></tr>
<tr class="status_passed"><td>
xxxxxx.html

How to stop selenium from printing these verbose output?

I have another question. How to increase the timeout value for an operation in selenium?


Thanks,
Aswini

Krishnan Mahadevan

unread,
Apr 25, 2013, 12:07:57 PM4/25/13
to Selenium Users
Aswini,

Have you tried this ?

You should find a default logging.properties (its a utils logger property
file) under your jdk installation [jre/lib/logging.properties]
Copy that file to the directory where you have your selenium jar.

Edit that file and then change the console handler level to OFF as shown
below.

java.util.logging.ConsoleHandler.level = OFF

That should take care of it.

Dont forget to pass the path of this file to your java -jar command via the
VM arg

For e.g, : java -jar -Djava.util.logging.config.file=my.properties
selenium.jar


On a side note, in case you wanted debug information to be written to a
separate file, you can pass the VM arg -D

java -jar -Dselenium.LOGGER=dummy.txt selenium.jar


Alternatively you can also try doing it like this : http://wiki.openqa.org/display/SRC/Selenium+RC+Logging+for+Developers



Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/


--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/selenium-users/-/ePLEiU-lvxkJ.

For more options, visit https://groups.google.com/groups/opt_out.
 
 

Aswini Rajasekaran

unread,
Apr 26, 2013, 4:11:15 AM4/26/13
to seleniu...@googlegroups.com
Yes Krishnan. Here is my logging.properties file and how I call that in selenium.

I have taken a copy of logging.properties as selenium.log.properties and stored it in a directory /home/hudson and the file has this.

# Limit the message that are printed on the console to INFO and above.
java.util.logging.ConsoleHandler.level = OFF


and I call the selenium suite like this,

java -jar $dir/itest-selenium/selenium-server-standalone-2.31.0.jar -Djava.util.logging.config.file=/home/hudson/selenium.log.properties


But, still it is not working. Am I doing something wrong here?


Aswini

Aswini Rajasekaran

unread,
May 1, 2013, 6:25:01 AM5/1/13
to seleniu...@googlegroups.com
Hi all,

Has anyone tried this and it works? Or any other solution for turning off the verbose logging in console?

Regards,
Aswini
Reply all
Reply to author
Forward
0 new messages