summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Logging.pm
diff options
context:
space:
mode:
Diffstat (limited to 'Bugzilla/Logging.pm')
-rw-r--r--Bugzilla/Logging.pm9
1 files changed, 4 insertions, 5 deletions
diff --git a/Bugzilla/Logging.pm b/Bugzilla/Logging.pm
index 1d42f1ffd..b69ffa2e9 100644
--- a/Bugzilla/Logging.pm
+++ b/Bugzilla/Logging.pm
@@ -16,6 +16,10 @@ use File::Spec::Functions qw(rel2abs);
use Bugzilla::Constants qw(bz_locations);
use English qw(-no_match_vars $PROGRAM_NAME);
+sub is_interactive {
+ return exists $ENV{'SERVER_SOFTWARE'} ? 1 : 0;
+}
+
BEGIN {
my $file = $ENV{LOG4PERL_CONFIG_FILE} // 'log4perl-syslog.conf';
Log::Log4perl::Logger::create_custom_level('NOTICE', 'WARN', 5, 2);
@@ -106,9 +110,4 @@ sub import {
);
}
-sub is_interactive {
- state $is_tty = -t STDOUT || -t STDIN;
- return $is_tty || $ENV{"Bugzilla.pm"} && Bugzilla->usage_mode == Bugzilla::Constants::USAGE_MODE_CMDLINE;
-}
-
1;