diff options
author | Pascal Terjan <pterjan@mageia.org> | 2012-03-12 18:13:57 +0000 |
---|---|---|
committer | Pascal Terjan <pterjan@mageia.org> | 2012-03-12 18:13:57 +0000 |
commit | e5fefd376242c7024cce11b6b2e62749aed53bd9 (patch) | |
tree | 1e6dbca5288acca174a672b4cb217679abe6980b /lib/Iurt/Config.pm | |
parent | 795d8a847ba15ee5d5d8fd1eda8742e41b4d90e5 (diff) | |
download | iurt-e5fefd376242c7024cce11b6b2e62749aed53bd9.tar iurt-e5fefd376242c7024cce11b6b2e62749aed53bd9.tar.gz iurt-e5fefd376242c7024cce11b6b2e62749aed53bd9.tar.bz2 iurt-e5fefd376242c7024cce11b6b2e62749aed53bd9.tar.xz iurt-e5fefd376242c7024cce11b6b2e62749aed53bd9.zip |
Never manually write to log file
Diffstat (limited to 'lib/Iurt/Config.pm')
-rw-r--r-- | lib/Iurt/Config.pm | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Iurt/Config.pm b/lib/Iurt/Config.pm index c2fbe6d..33d822f 100644 --- a/lib/Iurt/Config.pm +++ b/lib/Iurt/Config.pm @@ -137,7 +137,7 @@ sub init_cache { my $cachefile = "$config->{cache_home}/$program_name.cache"; my $cache; if (-f $cachefile) { - $run->{LOG}->("$program_name: loading cache file $cachefile\n"); + plog('DEBUG', "loading cache file $cachefile"); $cache = eval(cat_($cachefile)) or print "FATAL $program_name: could not load cache $cachefile ($!)\n"; } else { $cache = $empty; @@ -166,9 +166,9 @@ sub dump_cache { $Data::Dumper::Terse = 1; print $file Data::Dumper->Dump([ $cache ], [ "cache" ]); # flock does not work on network files and lockf seems to fail too - $run->{LOG}->("$program_name: locking to dump the cache in $filename\n"); + plog('DEBUG', "locking to dump the cache in $filename"); if (-f "$filename.lock") { - $run->{LOG}->("ERROR iurt: manual file lock exist, do not save the cache\n"); + plog('ERROR', 'ERROR: manual file lock exist, do not save the cache'); } else { open my $lock, ">$filename.lock"; print $lock $$; |