summaryrefslogtreecommitdiff
path: root/Master/tlpkg
diff options
context:
space:
mode:
Diffstat (limited to 'Master/tlpkg')
-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