Re: new debian patches

"Stefan Jakobs" <[email protected]> Sun, 14 Sep 2014 23:12:25 +0200
Newsgroups gmane.comp.log.logwatch.devel
Message-ID <2299262.YcVngebUjU@genux>
Willi Mann:
> Hi,

Hello,
 
> thanks for including (most of) the patches.
> 
> Am 2014-09-09 um 01:01 schrieb Stefan Jakobs:
> >> 0005-logfiles-vsftpd.conf-Use-custom-pattern-for-applystd.patch
> > 
> > Default syslog does not print a year. So this would break the filter on
> > many machines.
> 
> Hmm, I thought that vsftpd.log is written directly by the vsftpd daemon.

I don't know what's the default, but you can configure both.
In the past we assumed that logs are coming from syslog (where it is 
possible). I would like to stick with that assumption.
 
> >> 0006-Deb-specific-Print-full-path-to-freshclam-log.patch
> >> 
> >> is a hack that I think only makes sense on Debian where we know the
> >> default location of freshclam.log. I think it would be nice if service
> >> scripts could get the list of logfiles that triggered their invocation,
> >> but AFAIK this does not exist yet, right?
> > 
> > I have attached a rough patch which makes a space separated list of
> > logfiles/archives available via LOGWATCH_{LOGFILE,ARCHIVE}_LIST envionment
> > variable. Do you think this would be usefull?
> 
> There is no patch attached, but what you describe would be exactly what
> I need for freshclam log.

Oh, I forgot to attach it. Here it is.

> Bye
> Willi

Regards
Stefan

------------------------------------------------------------------------------
Want excitement?
Manually upgrade your production database.
When you want reliability, choose Perforce
Perforce version control. Predictably reliable.
http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk

_______________________________________________
Logwatch-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/logwatch-devel
logwatch_with_list.patch (text/x-patch, 1.1 KB)
--- scripts/logwatch.pl.orig	2014-01-05 20:38:32.956412904 +0100
+++ scripts/logwatch.pl	2014-09-09 00:53:08.413704204 +0200
@@ -1292,6 +1294,24 @@
             }
          }
       }
+      #SJ:
+      push @EnvList, 'LOGWATCH_LOGFILE_LIST';
+      push @EnvList, 'LOGWATCH_ARCHIVE_LIST';
+      foreach my $LogGroup (@FileList) {
+         foreach my $log (@{$LogFileData{$LogGroup}{'logfiles'}}) {
+            $ENV{'LOGWATCH_LOGFILE_LIST'} .= $log . " ";
+         }
+         foreach my $archive (@{$LogFileData{$LogGroup}{'archives'}}) {
+            $ENV{'LOGWATCH_ARCHIVE_LIST'} .= $archive . " ";
+         }
+      }
+      if ($Config{'debug'}>4) {
+         #print "export LOGWATCH_LOGFILE_LIST='@{$LogFileData{$LogGroup}{'logfiles'}}'\n";
+         #print "export LOGWATCH_ARCHIVE_LIST='@{$LogFileData{$LogGroup}{'archives'}}'\n";
+         print "\nexport LOGWATCH_LOGFILE_LIST='$ENV{LOGWATCH_LOGFILE_LIST}'";
+         print "\nexport LOGWATCH_ARCHIVE_LIST='$ENV{LOGWATCH_ARCHIVE_LIST}'";
+      }
+
       # ECP - insert the host stripping now
       my $HostStrip = " ";
       if ($Config{'hostformat'} ne "none") { #8.0