summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Logging.pm
diff options
context:
space:
mode:
authorDylan William Hardison <dylan@hardison.net>2018-04-10 17:29:02 +0200
committerGitHub <noreply@github.com>2018-04-10 17:29:02 +0200
commit0002ecc5bb7078e2da0350fcc3c2850cf02bcd7b (patch)
tree4a465207632b31ddae6d34df623ce37da5fd3267 /Bugzilla/Logging.pm
parent58c4f6814461ee4e35f0cffbdd63d948df940d35 (diff)
downloadbugzilla-0002ecc5bb7078e2da0350fcc3c2850cf02bcd7b.tar.gz
bugzilla-0002ecc5bb7078e2da0350fcc3c2850cf02bcd7b.tar.xz
Bug 1450990 - Refactor a bunch of the logging config files
Diffstat (limited to 'Bugzilla/Logging.pm')
-rw-r--r--Bugzilla/Logging.pm11
1 files changed, 8 insertions, 3 deletions
diff --git a/Bugzilla/Logging.pm b/Bugzilla/Logging.pm
index 4a7abcb21..f334435fc 100644
--- a/Bugzilla/Logging.pm
+++ b/Bugzilla/Logging.pm
@@ -12,12 +12,17 @@ use warnings;
use Log::Log4perl qw(:easy);
use Log::Log4perl::MDC;
-use File::Spec::Functions qw(rel2abs);
+use File::Spec::Functions qw(rel2abs catfile);
use Bugzilla::Constants qw(bz_locations);
use English qw(-no_match_vars $PROGRAM_NAME);
+use Taint::Util qw(untaint);
-sub is_interactive {
- return not exists $ENV{SERVER_SOFTWARE}
+sub logfile {
+ my ($class, $name) = @_;
+
+ my $file = rel2abs(catfile(bz_locations->{logsdir}, $name));
+ untaint($file);
+ return $file;
}
sub fields {