Guillaume Belrose
unread,Feb 22, 2012, 5:53:35 AM2/22/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to gitblit
Hi all,
I am using Gitblit internally within my company to host Git
repositories. I really like this tool as it is very easy to configure
and run, and being Java-based it works very well on Windows. I am
using Gitblit Go as a Windows service and I've eventually managed to
tweak the service configuration to customize the log4j logging. In
case you need to do something similar, here are the steps that I've
followed:
Make sure the service is uninstalled, by calling uninstallService.cmd
From the Gitblit Go folder, edit the file installService.cmd
Add a --JvmOptions line with a parameter pointing to your
log4j.properties file. See the example below.
"%CD%\%ARCH%\gitblit.exe" //IS//gitblit ^
--DisplayName="gitblit" ^
--Description="a pure Java Git solution" ^
--Startup=auto ^
--LogPath="%CD%\logs" ^
--LogLevel=INFO ^
--LogPrefix=procrun ^
--StdOutput=auto ^
--StdError=auto ^
--StartPath="%CD%" ^
--StartClass=com.gitblit.Launcher ^
--StartMethod=main ^
--StartParams="--storePassword;gitblit" ^
--StartMode=jvm ^
--StopPath="%CD%" ^
--StopClass=com.gitblit.Launcher ^
--StopMethod=main ^
--StopParams="--stop" ^
--StopMode=jvm ^
--Classpath="%CD%\gitblit.jar" ^
--Jvm=auto ^
--JvmOptions=-Dlog4j.configuration=file:///C:/gitblit-0.8.2/
log4j.properties ^
--JvmMx=1024
Run installService.cmd to reinstall the service.
I am hoping this is useful.
Cheers,
Guillaume.