How can you turn off logging on Selenium-Server?

5,392 views
Skip to first unread message

Rex

unread,
Jun 17, 2010, 1:26:03 PM6/17/10
to Selenium Users
Hi all,

I have an environment that is VMed (i.e. virtual machine) so the less
disk activity we have the better the performance.

I need to turn off disk activity as much as possible. I cannot figure
out a way to do that on the Selenium Server (java -jar selenium-
server.jar).

I would also like to know how to turn off the command history on the
Selenium Browser when you lunch a test.

I appreciate your help.

--Rex

Prasad Joshi

unread,
Jun 18, 2010, 12:18:48 AM6/18/10
to seleniu...@googlegroups.com
Hi,

Which Selenium-RC version are you using?

If it is selenium 1.0.1 and above then after launching a test it will open two browser sessions, one will be your AUT and another contains selenium commands.

--Prasad


--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To post to this group, send email to seleniu...@googlegroups.com.
To unsubscribe from this group, send email to selenium-user...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/selenium-users?hl=en.


Brian Rock

unread,
Jun 18, 2010, 9:59:41 AM6/18/10
to seleniu...@googlegroups.com
I think he's asking how to run this in a 'silent' mode so that extra browser isn't opened.  I'd be curious to know how to do this as well. 

Anyone?

SiKing

unread,
Jun 18, 2010, 2:13:37 PM6/18/10
to Selenium Users
1. I do not believe that you can turn off the info messages. If you
are running on Linux, you could fake it with something like 'java -jar
selenium-server.jar ... &> /dev/null'; I do not know what the Windows
equivalent of /dev/null is.
2. I do not believe that those info messages go to the disk, unless
you explicitly ask for it, therefore turning this off will not improve
your VM performance.
3. Have a look at 'java -jar selenium-server.jar -help' to see what is
possible.

HTH.

Krishnan Mahadevan

unread,
Nov 23, 2012, 3:31:36 AM11/23/12
to seleniu...@googlegroups.com
Luke,
Here's how you do it.


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

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"



On Thu, Nov 22, 2012 at 5:30 PM, Luke Egging <luke.a...@gmail.com> wrote:
Any updates on this? I would also like to turn off the logging I get to the Console by Selenium Server Standalone when running in grid mode.

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To post to this group, send email to seleniu...@googlegroups.com.
To unsubscribe from this group, send email to selenium-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/selenium-users/-/aWWJac5HzWoJ.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Luke Egging

unread,
Nov 25, 2012, 5:53:23 AM11/25/12
to seleniu...@googlegroups.com
Thanks Krishnan,

Using the logging.properties file as you suggested definitely turns off console logging - thanks! :)

Interestingly I'm seeing the console logging turn on again when I specify the selenium log file... Turning on the log file using your approach above or by specifying it with the '-log' selenium command line argument seems to ignore the fact that we turned off console logging in the properties file. Pretty weird!

Any ideas?

Kind Regards,
Luke

Krishnan Mahadevan

unread,
Nov 26, 2012, 11:36:01 AM11/26/12
to seleniu...@googlegroups.com
Luke,
Can you please show the command that you are using and also share your logging properties file because I cant seem to recreate this.


Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"



On Sun, Nov 25, 2012 at 4:23 PM, Luke Egging <luke.a...@gmail.com> wrote:
java.util.logging.config.file=

Leslie Chong

unread,
Jun 23, 2013, 10:56:08 PM6/23/13
to seleniu...@googlegroups.com
I'm desperately trying to turn off our Selenium Server logger. We're grabbing the jar via maven and starting the server programmatically with server.start(). I cannot figure out how to mute the server logging.

Thanks for any help,
-Leslie

Jan Kester

unread,
Feb 14, 2014, 1:53:04 PM2/14/14
to seleniu...@googlegroups.com
You need to have logging.properties on classpath, for instance src/main/resources.

You can switch off, but nicer direct jul logging to log4j.
Now in log4j.xml you can filter on packages.

Same works for common logging too.

Kishori Patil

unread,
Sep 17, 2014, 7:29:49 AM9/17/14
to seleniu...@googlegroups.com
Thanks Krishnan It worked for me.
But now I want to use this same mechanism while executing from Eclipse.
Can you guide me where and how to configure this property in eclipse project.?

Kishori Patil

unread,
Sep 17, 2014, 7:38:51 AM9/17/14
to seleniu...@googlegroups.com
I tried adding below in Default VM Arguments in Eclipse at Windows>Preferences>InstalledJRE >Edit
-Djava.util.logging.config.file=C:/my.properties
Still it doesn't work.
Please guide

On Friday, November 23, 2012 2:01:47 PM UTC+5:30, Krishnan wrote:

Kishori Patil

unread,
Sep 17, 2014, 7:43:44 AM9/17/14
to seleniu...@googlegroups.com
My earlier resolution worked. Thanks :)

On Friday, November 23, 2012 2:01:47 PM UTC+5:30, Krishnan wrote:

Paul

unread,
Jan 17, 2018, 9:58:44 AM1/17/18
to Selenium Users
I have similar task and after some headache, I had done this through:

java -jar -Dselenium.LOGGER.level=WARNING /opt/selenium/selenium-server-standalone.jar 

You can change the level to "OFF" if you wanted to turn off all logs. 

Just play around it... 

Reply all
Reply to author
Forward
0 new messages