summaryrefslogtreecommitdiffstats
path: root/conf/log4perl-json.conf
diff options
context:
space:
mode:
authorDylan William Hardison <dylan@hardison.net>2018-03-02 03:17:23 +0100
committerGitHub <noreply@github.com>2018-03-02 03:17:23 +0100
commitb5ece2542a5416c97f3b9e060b877404349fafe6 (patch)
treef4d3defbc92195287e34806812ba4c4922beeccc /conf/log4perl-json.conf
parentee53f368cbdab939fbc70e82bf135967b796f5c0 (diff)
downloadbugzilla-b5ece2542a5416c97f3b9e060b877404349fafe6.tar.gz
bugzilla-b5ece2542a5416c97f3b9e060b877404349fafe6.tar.xz
Bug 1442288 - Bugzilla::Logging should log when a program is being run interactively
Diffstat (limited to 'conf/log4perl-json.conf')
-rw-r--r--conf/log4perl-json.conf22
1 files changed, 14 insertions, 8 deletions
diff --git a/conf/log4perl-json.conf b/conf/log4perl-json.conf
index 41562034e..c5d7e2c1f 100644
--- a/conf/log4perl-json.conf
+++ b/conf/log4perl-json.conf
@@ -1,16 +1,22 @@
-log4perl.rootLogger = INFO, Socket
-log4perl.appender.Socket = Log::Log4perl::Appender::Socket
-log4perl.appender.Socket.PeerAddr=127.0.0.1
-log4perl.appender.Socket.PeerPort=5880
-log4perl.appender.Socket.defer_connection=1
+log4perl.rootLogger = INFO, Cereal, Screen
+log4perl.appender.Cereal = Log::Log4perl::Appender::Socket
+log4perl.appender.Cereal.PeerAddr=127.0.0.1
+log4perl.appender.Cereal.PeerPort=5880
+log4perl.appender.Cereal.defer_connection=1
# This class is currently bundled with bugzilla
-log4perl.appender.Socket.layout = Log::Log4perl::Layout::Mozilla
+log4perl.appender.Cereal.layout = Log::Log4perl::Layout::Mozilla
# lines longer than this will not be logged in detail.
# instead a scary message with a much higher severity will be logged.
-log4perl.appender.Socket.layout.max_json_length = 16384
+log4perl.appender.Cereal.layout.max_json_length = 16384
# The default is Bugzilla. This is the "Logger" field
# in https://wiki.mozilla.org/Firefox/Services/Logging#MozLog_JSON_schema
#and it might be useful to pass in different values for different jobs.
-log4perl.appender.Socket.layout.name = Bugzilla
+log4perl.appender.Cereal.layout.name = Bugzilla
+
+log4perl.filter.IS_INTERACTIVE = sub { Bugzilla::Logging::is_interactive() }
+log4perl.appender.Screen = Log::Log4perl::Appender::Screen
+log4perl.appender.Screen.Filter = IS_INTERACTIVE
+log4perl.appender.Screen.layout = Log::Log4perl::Layout::PatternLayout
+log4perl.appender.Screen.layout.ConversionPattern = %-5.5p [%d] [%c] %m{chomp} at %F line %L (%M)%n