summaryrefslogtreecommitdiffstats
path: root/urpm
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2006-02-07 17:59:00 +0000
committerRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2006-02-07 17:59:00 +0000
commit1502b75accd0640ec2e46573ddc1ff42029729a8 (patch)
treedd22e7768f5e6aaee906c2a8e570cc555e35b2fe /urpm
parent51392ad7466915afc80d2b2d39e744bbd17cd272 (diff)
downloadurpmi-1502b75accd0640ec2e46573ddc1ff42029729a8.tar
urpmi-1502b75accd0640ec2e46573ddc1ff42029729a8.tar.gz
urpmi-1502b75accd0640ec2e46573ddc1ff42029729a8.tar.bz2
urpmi-1502b75accd0640ec2e46573ddc1ff42029729a8.tar.xz
urpmi-1502b75accd0640ec2e46573ddc1ff42029729a8.zip
A bit of clarification in logging code
Diffstat (limited to 'urpm')
-rw-r--r--urpm/msg.pm7
1 files changed, 4 insertions, 3 deletions
diff --git a/urpm/msg.pm b/urpm/msg.pm
index 75b65a27..18053e13 100644
--- a/urpm/msg.pm
+++ b/urpm/msg.pm
@@ -46,10 +46,11 @@ sub N {
my $noexpr = N("Nn");
my $yesexpr = N("Yy");
+#- writes only to logfile, not to screen
sub log_it {
- #- if invoked as a simple user, nothing should be logged.
- if ($::log) {
- open my $fh, ">>$::log" or die "can't output to log file: $!\n";
+ if ($::logfile) {
+ open my $fh, ">>$::logfile"
+ or die "Can't output to log file [$::logfile]: $!\n";
print $fh @_;
close $fh;
}