summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2008-07-08 10:36:51 +0000
committerNorbert Preining <preining@logic.at>2008-07-08 10:36:51 +0000
commitec37cc2a52fd104c5aad039fb9f461f5bc14ee9e (patch)
treea583ccc8cfe37273f76a9993e167876b84169a9c /Master
parentb9c8bdcbb886f2579810c1feb005db1f049ba693 (diff)
TLUtils.pm: process_logging_options: support --logfile=logfile
git-svn-id: svn://tug.org/texlive/trunk@9355 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/tlpkg/TeXLive/TLUtils.pm9
1 files changed, 8 insertions, 1 deletions
diff --git a/Master/tlpkg/TeXLive/TLUtils.pm b/Master/tlpkg/TeXLive/TLUtils.pm
index 45a60a17389..a3470b09a43 100644
--- a/Master/tlpkg/TeXLive/TLUtils.pm
+++ b/Master/tlpkg/TeXLive/TLUtils.pm
@@ -1538,11 +1538,18 @@ sub tlwarn {
sub process_logging_options {
$::opt_verbosity = 0;
$::opt_quiet = 0;
+ my $opt_logfile;
# check all the command line options for occurrences of -q and -v
# do not report errors
my $oldconfig = Getopt::Long::Configure(qw(pass_through permute));
- GetOptions("v+" => \$::opt_verbosity, "q" => \$::opt_quiet);
+ GetOptions("logfile=s" => \$opt_logfile,
+ "v+" => \$::opt_verbosity,
+ "q" => \$::opt_quiet);
Getopt::Long::Configure($oldconfig);
+ if ($opt_logfile) {
+ open(TLUTILS_LOGFILE, ">$opt_logfile") || die "open(>$opt_logfile) failed: $!\n";
+ $::LOGFILE = \*TLUTILS_LOGFILE;
+ }
}
=pod