aboutsummaryrefslogtreecommitdiffstats
path: root/ulri
diff options
context:
space:
mode:
authorNicolas Vigier <boklm@mageia.org>2012-07-05 17:23:10 +0000
committerNicolas Vigier <boklm@mageia.org>2012-07-05 17:23:10 +0000
commit37a325a1b59cfde1130994defa843afce425b095 (patch)
tree48e13e91b38b73da887979c9c4153393634c42d1 /ulri
parent54e3df7e419821569b21b22e5e289f1613754ae0 (diff)
downloadiurt-37a325a1b59cfde1130994defa843afce425b095.tar
iurt-37a325a1b59cfde1130994defa843afce425b095.tar.gz
iurt-37a325a1b59cfde1130994defa843afce425b095.tar.bz2
iurt-37a325a1b59cfde1130994defa843afce425b095.tar.xz
iurt-37a325a1b59cfde1130994defa843afce425b095.zip
allow emi and ulri to log to a file instead of stderr by setting
EMI_LOG_FILE or ULRI_LOG_FILE environement variables
Diffstat (limited to 'ulri')
-rwxr-xr-xulri5
1 files changed, 4 insertions, 1 deletions
diff --git a/ulri b/ulri
index 011e2c4..06b325d 100755
--- a/ulri
+++ b/ulri
@@ -49,7 +49,10 @@ my %run;
my $program_name = 'ulri';
$run{program_name} = $program_name;
-open(my $LOG, ">&STDERR");
+my $LOG;
+if (!$ENV{'ULRI_LOG_FILE'} || !open($LOG, '>>', $ENV{'ULRI_LOG_FILE'})) {
+ open(my $LOG, ">&STDERR");
+}
plog_init($program_name, $LOG, 7, 1);