Log4j for Grid (Hub) Logs

Hi Team,
I need to capture Grid (Selenium server logs) to analyze server log.
Using Log4j , eclipse ,testng at my end.
I did find the below
java -Dlog4j.configuration=log4j.properties -cp log4j-1.2.14.jar;selenium-server.jar org.openqa.selenium.server.SeleniumServer
Query

  1. What goes in properties file

Any other approach, reference shall be useful.

@Aleksei any advise.

Why not redirect logs with java to some file like:

java -log /tmp/selenium-log ..... (here selenium-stadalone.jar)

Thanks @Aleksei will try and revert

Hi @Aleksei nothing happens… I tried
came across this link


I am unclear as what classpath is being refered too as I dont have the dir mentioned
Cant I replace with the path to D:/?

Also found 1 link
https://web.archive.org/web/20130104221148/http://wiki.openqa.org/display/SRC/Selenium+RC+Logging+for+Developers
java -Dlog4j.configuration=log4j.properties -cp log4j-1.2.14.jar;selenium-server.jar org.openqa.selenium.server.SeleniumServer
I tried
java -Dlog4j.configuration=D:/Test/log4j.properties -cp log4j.jar;selenium-server-standalone-3.141.59.jar -role hub
Nothing happens…

@vsharma i have no problem writing output to file with:

java -jar selenium-server-standalone-3.141.59.jar 2>>selenium-log.txt -role hub

Thanks @Aleksei it worked I do see a file created.
What does 2>> refer too? I would like to get some knowledge on that… reference good to have.