summaryrefslogtreecommitdiffstats
path: root/urpm/msg.pm
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2012-12-13 09:54:11 +0000
committerThierry Vignaud <tv@mageia.org>2012-12-13 09:54:11 +0000
commitfa37569a1609f93925063b5b8a83d0e2fb16816c (patch)
treef46c1eaf4699059dda35c767aa3287c3b5ae64e6 /urpm/msg.pm
parent4a8e726b2a297aa91642afb2abd60844a8b63bff (diff)
downloadurpmi-fa37569a1609f93925063b5b8a83d0e2fb16816c.tar
urpmi-fa37569a1609f93925063b5b8a83d0e2fb16816c.tar.gz
urpmi-fa37569a1609f93925063b5b8a83d0e2fb16816c.tar.bz2
urpmi-fa37569a1609f93925063b5b8a83d0e2fb16816c.tar.xz
urpmi-fa37569a1609f93925063b5b8a83d0e2fb16816c.zip
(bug_log) simplify using append_to_file()
Diffstat (limited to 'urpm/msg.pm')
-rw-r--r--urpm/msg.pm8
1 files changed, 2 insertions, 6 deletions
diff --git a/urpm/msg.pm b/urpm/msg.pm
index b062ee7f..010741a4 100644
--- a/urpm/msg.pm
+++ b/urpm/msg.pm
@@ -6,6 +6,7 @@ use strict;
no warnings;
use Exporter;
use URPM;
+use urpm::util;
my $encoding;
BEGIN {
@@ -92,12 +93,7 @@ sub sys_log { defined &syslog and eval { syslog("info", @_) } }
#- writes only to logfile, not to screen
sub bug_log {
- if ($::logfile) {
- open my $fh, ">>$::logfile"
- or die "Can't output to log file [$::logfile]: $!\n";
- print $fh @_;
- close $fh;
- }
+ append_to_file($::logfile, @_) if $::logfile;
}
sub ask_yes_or_no {