The default for Logwatch-7.3.6 has changed to print the output to stdout, however, the crontab file in /etc/cron.daily/00-logwatch redirects stdout to /dev/null. Reproducible: Always Steps to Reproduce: 1.emerge logwatch 2. /etc/cron.daily/00-logwatch 3. Actual Results: No output, no email.
I had the same issue but fixed it with creating a conf directory in /etc/logwatch (i.e. /etc/logwatch/conf) and copying /usr/share/logwatch/default.conf/logwatch.conf into /etc/logwatch/conf (i.e. cp /usr/share/logwatch/default.conf/logwatch.conf /etc/logwatch/conf). Then change the Print option from Yes to No. That fixed my issue.
(In reply to comment #0) > The default for Logwatch-7.3.6 has changed to print the output to stdout, > however, the crontab file in /etc/cron.daily/00-logwatch redirects stdout to > /dev/null. Logwatch versions newer than 7.3.4 will by default print the output to stdout rather than mailing it. Since you've got output redrected to /dev/null, you're discarding it. Either configure Logwatch to do its own mailing, or remove the redirect so that cron can mail it.
In response to Mark Wagner, I think that you are missing my point. The ebuild creates a crontab file which sends the output to /dev/null. There is absolutely no point in installing logwatch if you are going to send the output to /dev/null. Yes, it is an easy fix for the user, but why is it this way in the first place? To clarify further -- you say "you've got output redrected to /dev/null", but in this case, the use of "you" is inaccurate -- it is the ebuild that sets it up this way.
The default behaviour of logwatch changed. At least an ewarn in the ebuild would be appropriate. Principle of least surprise.
Created attachment 183334 [details, diff] Restore previous (and useful) behavior where logwatch actually sends it output someplace useful (mailto:root) As was previously indicated, logwatch 7.3.4 -> 7.3.5 changed the default behavior of e-mailing results to just printing results. This makes Gentoo's default cron entry useless. With logwatch 7.3.6 recently going stable, this problem is exacerbated. So, here's a patch to make logwatch's default installation useful again.
(In reply to comment #5) > With logwatch 7.3.6 recently going stable, this problem is exacerbated. So, > here's a patch to make logwatch's default installation useful again. IMHO the cron $MAILTO is not alwas the destination for the logwatch output, esp. if one have configured a "MailTo" in the logwatch configuration. I suggest an entry in on the following files: - /etc/logwatch/conf/logwatch.conf "Print = No" - /etc/logwatch/conf/override.conf "logwatch: Print = No" This restore the prev. behavoir of logwatch BTW: an ewarn had saved an hour or two for me ;)
(In reply to comment #6) > IMHO the cron $MAILTO is not alwas the destination for the logwatch output, > esp. if one have configured a "MailTo" in the logwatch configuration. Good point, however, I still agree with upstream's decision. I like the idea that running logwatch from the command-line spits out a bunch of stuff to stdout instead of e-mailing output by default. (That way I don't have to remember to tell it _not_ to e-mail something when I'm messing with it from the command-line.) You're right, however, the cron patch above doesn't "restore previous functionality", it just makes logwatch start e-mailing again instead of doing nothing. :-)
It's the crontab entry that needs to change. The file /etc/cron.daily/00-logwatch is where the problem lies. This file is a Gentoo-provided file -- it is not part of upstream Logwatch. It makes no sense to have a crontab file that redirects the output of logwatch to /dev/null. All it needs is the removal of "2>&1 > /dev/null" How hard is that?
(In reply to comment #5) > Created an attachment (id=183334) [edit] > Restore previous (and useful) behavior where logwatch actually sends it output > someplace useful (mailto:root) > > As was previously indicated, logwatch 7.3.4 -> 7.3.5 changed the default > behavior of e-mailing results to just printing results. This makes Gentoo's > default cron entry useless. > > With logwatch 7.3.6 recently going stable, this problem is exacerbated. So, > here's a patch to make logwatch's default installation useful again. > I was burnt by this on two of my production machines. There was no ewarn, and having the current 00-logwatch cron file makes 0 sense. This patch keeps everything working the way everybody expects it to without breaking anything. Also, if you run logwatch from the command line it will work just as intended.
I recently ran emerge -e world and logwatch stopped sending me email reports. I must have just edited /usr/share/logwatch/default.conf/logwatch.conf, because /etc/logwatch was just an empty directory. Either that or the reinstall nuked all my files there. In any case, Comment #1 is correct. Creating the subdirectory /etc/logwatch/conf and copying /usr/share/logwatch/default.conf/logwatch.conf to /etc/logwatch/conf/ then changing "Print = Yes" to "Print = No" does the trick. The cron job file is fine. IMO, the ebuild should at the very least create the subdirectory and copy the standard config file there. The option to "Print" or "mail" should be left for the user to decide.
Created attachment 201640 [details, diff] Ebuild patch for logwatch 7.3.6-r1 - Added ewarn to ebuild about cron/printing/mailing behavior (suggestion Comment #4) - Changed ebuild to create local copy of logwatch.conf in /etc/logwatch/conf in order to make logwatch behavior customization more straight-forward (suggestion Comment #10) - Minor ebuild cleaned-up
fixed in sys-apps/logwatch-7.3.7_pre20091204