On Thu, 20 Sep 2012, Thorsten Glaser wrote:

> attached, “should” fix the issue.

This one indeed works and comes with a NEWS entry, which you’d
obviously have to adjust to Debian packaging (I just deployed
that locally, that’s why).

bye,
//mirabilos
-- 
tarent solutions GmbH
Rochusstraße 2-4, D-53123 Bonn • http://www.tarent.de/
Tel: +49 228 54881-393 • Fax: +49 228 54881-314
HRB 5168 (AG Bonn) • USt-ID (VAT): DE122264941
Geschäftsführer: Boris Esser, Sebastian Mancke
diff -Nru logwatch-7.4.0+svn20120502rev103/debian/NEWS 
logwatch-7.4.0+svn20120502rev103/debian/NEWS
--- logwatch-7.4.0+svn20120502rev103/debian/NEWS        2012-05-05 
21:20:43.000000000 +0200
+++ logwatch-7.4.0+svn20120502rev103/debian/NEWS        2012-09-21 
10:43:16.000000000 +0200
@@ -1,3 +1,14 @@
+logwatch (7.4.0+svn20120502rev103-1tarent2) unstable; urgency=low
+
+  The http_rc_detail_rep facility is now documented and works,
+  although, for this, the upstream use of a hyphen-minus needs
+  to be replaced by an underscore as that is valid syntax. So,
+  for example, to get all 404 errors only as a summary, append
+  "$http_rc_detail_rep_404 = 20" to an appropriate config file
+  like /etc/logwatch/conf/services/http.conf or override.conf.
+
+ -- Thorsten Glaser <t.gla...@tarent.de>  Fri, 21 Sep 2012 10:43:10 +0200
+
 logwatch (7.1-1) unstable; urgency=low
 
   * This version will remove untouched configuration files in 
diff -Nru logwatch-7.4.0+svn20120502rev103/debian/changelog 
logwatch-7.4.0+svn20120502rev103/debian/changelog
--- logwatch-7.4.0+svn20120502rev103/debian/changelog   2012-05-05 
21:20:43.000000000 +0200
+++ logwatch-7.4.0+svn20120502rev103/debian/changelog   2012-09-21 
10:43:20.000000000 +0200
@@ -1,3 +1,9 @@
+logwatch (7.4.0+svn20120502rev103-1tarent2) unstable; urgency=low
+
+  * Unbreak and document http_rc_detail_rep (Closes: #688203)
+
+ -- Thorsten Glaser <t.gla...@tarent.de>  Fri, 21 Sep 2012 10:43:18 +0200
+
 logwatch (7.4.0+svn20120502rev103-1) unstable; urgency=low
 
   * Set VDate in logwatch.pl to svn date for svn snapshots
diff -Nru 
logwatch-7.4.0+svn20120502rev103/debian/patches/0007-fix-http_rc_detail_rep.patch
 
logwatch-7.4.0+svn20120502rev103/debian/patches/0007-fix-http_rc_detail_rep.patch
--- 
logwatch-7.4.0+svn20120502rev103/debian/patches/0007-fix-http_rc_detail_rep.patch
   1970-01-01 01:00:00.000000000 +0100
+++ 
logwatch-7.4.0+svn20120502rev103/debian/patches/0007-fix-http_rc_detail_rep.patch
   2012-09-21 09:27:39.000000000 +0200
@@ -0,0 +1,35 @@
+Description: Unbreak and document http_rc_detail_rep
+ The http_rc_detail_rep facility was never documented and does
+ not work anyway because it uses a hyphen-minus in an environment
+ variable which is not allowed syntax in many environments.
+Author: Thorsten Glaser <t.gla...@tarent.de>
+Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=688203
+Last-Update: 2012-09-20
+
+--- a/conf/services/http.conf
++++ b/conf/services/http.conf
+@@ -68,5 +68,13 @@ $HTTP_USER_DISPLAY = 0
+ # To display all user accesses except "Unauthorized":
+ # $HTTP_USER_DISPLAY = "$field{http_rc} != 401"
+ 
++# To raise the needed level of detail for one or more specific
++# error codes to display a summary instead of listing each
++# occurrence, set a variable like the following ones:
++# Raise 403 codes to detail level High
++#$http_rc_detail_rep_403 = 10
++# Always show only summary for 404 codes
++#$http_rc_detail_rep_404 = 20
++
+ 
+ # vi: shiftwidth=3 tabstop=3 et
+--- a/scripts/services/http
++++ b/scripts/services/http
+@@ -735,7 +735,7 @@ if (keys %needs_exam) {
+       if (not defined $StatusCode{$code}) {
+          $StatusCode{$code} = "\(undefined\)";
+       }
+-      if( ($ENV{"http_rc_detail_rep-$code"} || $detail) > $detail ) {
++      if( ($ENV{"http_rc_detail_rep_$code"} || $detail) > $detail ) {
+       # only display summary for this code
+          my $t = 0;
+          my $u = 0;
diff -Nru logwatch-7.4.0+svn20120502rev103/debian/patches/series 
logwatch-7.4.0+svn20120502rev103/debian/patches/series
--- logwatch-7.4.0+svn20120502rev103/debian/patches/series      2012-05-05 
21:20:43.000000000 +0200
+++ logwatch-7.4.0+svn20120502rev103/debian/patches/series      2012-09-21 
09:27:21.000000000 +0200
@@ -4,3 +4,4 @@
 0004-Bug-656806-Support-alternative-OoM-kernel-message-in.patch
 0005-bug-571163-Handle-changes-in-dovecot-logging-Updated.patch
 0006-Bug-624271-Add-nginx-log-file-location-to-httpd.patch
+0007-fix-http_rc_detail_rep.patch

Reply via email to