Where are git-daemon logs stored? (Git in windows using Cygwin)

I am running git -daemon as a windows service. (using Create Process) The command used in the service: git daemon --reuseaddr --base-path = / data / test_work / - export-all --verbose --enable = receive-pack

Where do I see git daemon logs?

Note: the file / var / logs is missing.

+4
source share
2 answers

If you still need and need to do this, I found a way to do this: just create a bash script with execute permissions and tell the daemon to write its materials to one or two files (if you want log stderr separately):

#!/bin/bash

# Git daemon launchd startup command.

GIT_RO_USER="git-ro" # The user which has read only access to the repositories.

GIT_REP_BASE_PATH="/path/to/GitRepositories" # The repositories base path.

GIT_LOG_FILE="/var/log/git.log" # The git daemon log file. The user which runs the script must have the right write permissions

/path/to/git daemon --reuseaddr --verbose --user=$GIT_RO_USER --base-path=$GIT_REP_BASE_PATH $GIT_REP_BASE_PATH >> $GIT_LOG_FILE 2>&1

# Or if you like to keep the error log separated, uncomment the following lines and comment the previous one:
#GIT_ERR_LOG_FILE="/var/log/git_err.log" # The error log file
#/path/to/git daemon --reuseaddr --verbose --user=$GIT_RO_USER --base-path=$GIT_REP_BASE_PATH $GIT_REP_BASE_PATH >> $GIT_LOG_FILE 2>> $GIT_ERR_LOG_FILE

/path/to/git - git. launchd OS X, , StandardOutPath StandardErrorPath , .plist.

, !

+1

git?

Git 2.17 (Q1 2018) , "git daemon" ; - ( syslog) inetd.

. 0c591ca (04 2018 .) Lucas Werkmeister (lucaswerkmeister).
: Ævar Arnfjörð Bjarmason (avar), Junio C Hamano (gitster) (sunshineco).
( Junio ​​C Hamano - gitster - commit c2bd43d, 21 2018 )

daemon: --log-destination=(stderr|syslog|none)

--syslog --inetd . ( --detach --syslog, --log-destination=stderr --detach , --detach disassociates stderr.) --syslog --log-destination=syslog.

--log-destination --syslog .
" ", Git, , , .
( , git " ".)

--inetd --log-destination=stderr git daemon systemd( ).
, syslog, , , git daemon ( , , ), cgroup systemd (. systemd/systemd issue 2913). stderr , systemd stderr , , .

+1

Source: https://habr.com/ru/post/1547361/


All Articles