From ceb11543b1995b5057290b762939ce22f5436fd5 Mon Sep 17 00:00:00 2001 From: Sitaram Chamarty Date: Tue, 14 Feb 2012 20:17:00 +0530 Subject: [PATCH] make log_it() put out a little more info if called prematurely --- src/gitolite.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gitolite.pm b/src/gitolite.pm index 062706f..27b761a 100644 --- a/src/gitolite.pm +++ b/src/gitolite.pm @@ -164,7 +164,9 @@ sub dos2unix { sub log_it { my ($ip, $logmsg); - open my $log_fh, ">>", $ENV{GL_LOG} or die "open log failed: $!\n"; + open my $log_fh, ">>", $ENV{GL_LOG} or die + "open log failed: $!\n" . + "attempting to log: " . ( $_[0] || '(nothing)' ) . "\n"; # first space sep field is client ip, per "man ssh" ($ip = $ENV{SSH_CONNECTION} || '(no-IP)') =~ s/ .*//; # the first part of logmsg is the actual command used; it's either passed