From fb85881651195cd97ef1499136e947dd56c3b4f3 Mon Sep 17 00:00:00 2001 From: Dylan William Hardison Date: Wed, 28 Feb 2018 21:55:10 -0500 Subject: Bug 1437646 - add support for Log::Log4perl --- conf/log4perl-json.conf | 16 ++++++++++++++++ conf/log4perl-syslog.conf | 9 +++++++++ conf/log4perl-test.conf | 7 +++++++ 3 files changed, 32 insertions(+) create mode 100644 conf/log4perl-json.conf create mode 100644 conf/log4perl-syslog.conf create mode 100644 conf/log4perl-test.conf (limited to 'conf') diff --git a/conf/log4perl-json.conf b/conf/log4perl-json.conf new file mode 100644 index 000000000..41562034e --- /dev/null +++ b/conf/log4perl-json.conf @@ -0,0 +1,16 @@ +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 + +# This class is currently bundled with bugzilla +log4perl.appender.Socket.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 +# 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 diff --git a/conf/log4perl-syslog.conf b/conf/log4perl-syslog.conf new file mode 100644 index 000000000..32f3d4c11 --- /dev/null +++ b/conf/log4perl-syslog.conf @@ -0,0 +1,9 @@ +log4perl.rootLogger = INFO, syslog +log4perl.appender.syslog = Log::Dispatch::Syslog +log4perl.appender.syslog.min_level = notice +log4perl.appender.syslog.ident = apache +log4perl.appender.syslog.facility = local4 +log4perl.appender.syslog.logopt = cons,pid +log4perl.appender.syslog.layout = Log::Log4perl::Layout::PatternLayout +log4perl.appender.syslog.layout.ConversionPattern = [%c] %m{chomp}%n + diff --git a/conf/log4perl-test.conf b/conf/log4perl-test.conf new file mode 100644 index 000000000..7f2309c80 --- /dev/null +++ b/conf/log4perl-test.conf @@ -0,0 +1,7 @@ +log4perl.rootLogger = DEBUG, DebugSocket +log4perl.appender.DebugSocket = Log::Log4perl::Appender::Socket +log4perl.appender.DebugSocket.PeerAddr=127.0.0.1 +log4perl.appender.DebugSocket.PeerPort=5880 +log4perl.appender.DebugSocket.defer_connection=1 +log4perl.appender.DebugSocket.layout = Log::Log4perl::Layout::PatternLayout +log4perl.appender.DebugSocket.layout.ConversionPattern = [%d] [%c] <%p> %m{chomp} at %F line %L (%M)%n -- cgit v1.2.3-24-g4f1b