Permalink
Browse files

make log_it() put out a little more info if called prematurely

  • Loading branch information...
1 parent 98720c1 commit ceb11543b1995b5057290b762939ce22f5436fd5 @sitaramc committed Feb 14, 2012
Showing with 3 additions and 1 deletion.
  1. +3 −1 src/gitolite.pm
View
4 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

0 comments on commit ceb1154

Please sign in to comment.