summaryrefslogtreecommitdiff
path: root/Master/tlpkg/TeXLive/TLUtils.pm
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2008-11-28 17:47:03 +0000
committerNorbert Preining <preining@logic.at>2008-11-28 17:47:03 +0000
commitc8c9fcdb443684e5fcde5385cc404e1fece80742 (patch)
treee04650832c9514eb160504350014e6bbd5481838 /Master/tlpkg/TeXLive/TLUtils.pm
parentd9f1a49a280852e433bece9549ae36ba86ace476 (diff)
add output hooks for d*ebug, and fix tlwarn hook usage
git-svn-id: svn://tug.org/texlive/trunk@11455 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/TeXLive/TLUtils.pm')
-rw-r--r--Master/tlpkg/TeXLive/TLUtils.pm25
1 files changed, 21 insertions, 4 deletions
diff --git a/Master/tlpkg/TeXLive/TLUtils.pm b/Master/tlpkg/TeXLive/TLUtils.pm
index faf4293d2ef..da113852cb2 100644
--- a/Master/tlpkg/TeXLive/TLUtils.pm
+++ b/Master/tlpkg/TeXLive/TLUtils.pm
@@ -1614,8 +1614,13 @@ package.
=cut
sub debug {
+ my $str = "D:@_";
return if ($::opt_verbosity < 1);
- logit(\*STDOUT, 1, "D:", @_);
+ logit(\*STDOUT, 1, $str);
+ chomp($str);
+ for my $i (@::debug_hook) {
+ &{$i}($str);
+ }
}
=pod
@@ -1633,8 +1638,13 @@ each package, in addition to the first level.
=cut
sub ddebug {
+ my $str = "DD:@_";
return if ($::opt_verbosity < 2);
- logit(\*STDOUT, 2, "DD:", @_);
+ logit(\*STDOUT, 2, $str);
+ chomp($str);
+ for my $i (@::ddebug_hook) {
+ &{$i}($str);
+ }
}
=item C<dddebug ($str1, $str2, ...)>
@@ -1651,8 +1661,13 @@ levels.
=cut
sub dddebug {
+ my $str = "DDD:@_";
return if ($::opt_verbosity < 3);
- logit(\*STDOUT, 3, "DDD:", @_);
+ logit(\*STDOUT, 3, $str);
+ chomp($str);
+ for my $i (@::dddebug_hook) {
+ &{$i}($str);
+ }
}
@@ -1677,9 +1692,11 @@ there.
=cut
sub tlwarn {
+ my $str = "@_";
my $savequiet = $::opt_quiet;
$::opt_quiet = 0;
- logit (\*STDERR, -100, @_);
+ logit (\*STDERR, -100, $str);
+ chomp($str);
$::opt_quiet = $savequiet;
for my $i (@::warn_hook) {
&{$i}($str);