summaryrefslogtreecommitdiff
path: root/compat/win32/syslog.c
AgeCommit message (Collapse)Author
2011-10-07mingw: avoid using strbuf in syslogErik Faye-Lund
strbuf can call die, which again can call syslog from git-daemon. Endless recursion is no fun; fix it by hand-rolling the logic. As a side-effect malloc/realloc errors are changed into non-fatal warnings; this is probably an improvement anyway. Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com> Noticed-by: Johannes Sixt <j.sixt@viscovery.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-11-04mingw: implement syslogMike Pape
Syslog does not usually exist on Windows, so implement our own using Window's ReportEvent mechanism. Strings containing "%1" gets expanded into them selves by ReportEvent, resulting in an unreadable string. "%2" and above is not a problem. Unfortunately, on Windows an IPv6 address can contain "%1", so expand "%1" to "% 1" before reporting. "%%1" is also a problem for ReportEvent, but that string cannot occur in an IPv6 address. Signed-off-by: Mike Pape <dotzenlabs@gmail.com> Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>