diff options
author | Norbert Preining <preining@logic.at> | 2008-05-19 08:37:41 +0000 |
---|---|---|
committer | Norbert Preining <preining@logic.at> | 2008-05-19 08:37:41 +0000 |
commit | 5177658bbbdaa8778cff3a2ac4fabb765bbcd8fe (patch) | |
tree | b00bfdb0be26f8f7ce3d626ac084b987c608c511 /Master/tlpkg/TeXLive/TLPOBJ.pm | |
parent | 58c870fa77e1ede0e7b21a7791d0fa5b8fd1542b (diff) |
big logging update, new logging facilities: info, debug, ddebug, tlwarn
and a way to automatically process the respective options -q and -v
via TeXLive::TLUtils::process_logging_options();
git-svn-id: svn://tug.org/texlive/trunk@8234 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/TeXLive/TLPOBJ.pm')
-rw-r--r-- | Master/tlpkg/TeXLive/TLPOBJ.pm | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/Master/tlpkg/TeXLive/TLPOBJ.pm b/Master/tlpkg/TeXLive/TLPOBJ.pm index f9fa7942b3c..83fbf80962d 100644 --- a/Master/tlpkg/TeXLive/TLPOBJ.pm +++ b/Master/tlpkg/TeXLive/TLPOBJ.pm @@ -7,7 +7,7 @@ package TeXLive::TLPOBJ; use TeXLive::TLConfig qw($DefaultCategory $CategoriesRegexp $MetaCategoriesRegexp $InfraLocation); -use TeXLive::TLUtils qw/win32 tllog/; +use TeXLive::TLUtils; #use File::Path; use TeXLive::TLTREE; #use FileHandle; # format_name in writeout, no idea how to rewrite @@ -77,10 +77,7 @@ sub from_fh { chomp($line); # we call tllog only when something will be logged, to speed things up. # this is the inner loop bounding the time to read tlpdb. - if ($::LOGLEVELTERMINAL >= $::LOG_DDDEBUG || - $::LOGLEVELFILE >= $::LOG_DDDEBUG) { - tllog($::LOG_DDDEBUG, "reading line: >>>$line<<<\n"); - } + ddebug("reading line: >>>$line<<<\n"); $line =~ /^\s*#/ && next; # skip comment lines if ($line =~ /^\s*$/o) { if (!$started) { next; } @@ -537,11 +534,11 @@ sub make_container { my $tar = $::progs{'tar'}; my $lzma = $::progs{'lzma'}; if (!defined($tar)) { - tllog($::LOG_NORMAL, "Programs have not been set up, trying with \"tar\"!\n"); + tlwarn("Programs have not been set up, trying with \"tar\"!\n"); $tar = "tar"; } if (!defined($lzma)) { - tllog($::LOG_NORMAL, "Programs have not been set up, trying with \"lzma\"!\n"); + tlwarn("Programs have not been set up, trying with \"lzma\"!\n"); $lzma = "lzma"; } my @cmdline = ($tar, "-c", "-f", "$destdir/$tarname", "--files-from=-"); @@ -565,13 +562,13 @@ sub make_container { if (-r "$destdir/$tarname") { system($lzma, "--force", "-z", "$destdir/$tarname"); } else { - warn("Couldn't find $destdir/$tarname"); + tlwarn("Couldn't find $destdir/$tarname"); } # cleaning up unlink("$tlpobjdir/$self->{'name'}.tlpobj"); rmdir("$tlpobjdir") if $removetlpobjdir; chdir($cwd); - tllog($::LOG_DDDEBUG, "Done $containername\n"); + ddebug("Done $containername\n"); } @@ -816,7 +813,7 @@ sub make_return_hash_from_executes { } elsif ($e =~ m/^BuildLanguageDat\s+([^\s]+)\s*$/) { push @dats, $1; } else { - warn("Unknown execute $e in ", $self->name); + tlwarn("Unknown execute $e in ", $self->name); } } $ret{'map'} = [ @maps ] if (@maps); |