add more detail to error message

this error normally happens due to some permission issue on the log
file, but we weren't printing the actual cause, so it was confusing
redis
Sitaram Chamarty 2012-12-14 07:28:58 +05:30
parent 8e3ee2f9c1
commit 2048484578
1 changed files with 1 additions and 1 deletions

View File

@ -277,7 +277,7 @@ sub gl_log {
my $fh;
logger_plus_stderr( "errors found before logging could be setup", "$msg" ) if not $ENV{GL_LOGFILE};
open my $lfh, ">>", $ENV{GL_LOGFILE}
or logger_plus_stderr( "errors found before logfile could be created", "$msg" );
or logger_plus_stderr( "errors found but logfile could not be created", "$ENV{GL_LOGFILE}: $!", "$msg" );
print $lfh "$ts\t$tid\t$msg\n";
close $lfh;
}