I am running git-daemon as a windows service. (using Create Process)
The command used in service is:
git daemon --reuseaddr --base-path=/data/test_work/ --export-all \
--verbose --enable=receive-pack
Where do I see the logs of git daemon
?
Note: there is no file at /var/logs
.
If you still need and want to do it, I have found a way to do that: just create a bash script with execution permissions and tell the daemon to log its stuff into one or two files (if you want to log stderr separately):
Where
/path/to/git
is the path to the git command. I use it withlaunchd
on my OS X machine cause I have noticed that you can't setupStandardOutPath
andStandardErrorPath
keys for the daemon using a .plist file.Hope it helps you too!
Git 2.17 (Q1 2018) can help, since the log from "
git daemon
" can be redirected with a new option; one relevant use case is to send the log to standard error (instead of syslog) when running it frominetd
.See commit 0c591ca (04 Feb 2018) by Lucas Werkmeister (
lucaswerkmeister
).Helped-by: Ævar Arnfjörð Bjarmason (
avar
), Junio C Hamano (gitster
), and Eric Sunshine (sunshineco
).(Merged by Junio C Hamano --
gitster
-- in commit c2bd43d, 21 Feb 2018)Git 2.18 (Q2 2018) make things more robust, since the recent introduction of "
--log-destination
" option to "git daemon
" did not work well when the daemon was run under "--inetd
" mode.