Re: Ideas for splithost, hostname, multiemail in Logwatch 8.0

Tom Metro <[email protected]>
Newsgroups gmane.comp.log.logwatch.devel
Message-ID <[email protected]>
MrC wrote:
> It think *how* the reports are split should be distinct from *where* the 
> reports go (email, file, screen), and distinct from email address 
> specification.

I agree with this, though I don't have a strong opinion on these 
features as I don't have any plans to run logwatch on a machine with 
logs consolidated from multiple hosts.


> As a personally preferance, I think --reportbyhost is clearer than 
> --splithost...

I'd vote for this as well.


> I would suggest a more common, vanilla approach:
> --nosplithost
> Usage of the --no prefix is very common, and built into Getopts.

I'd second that.


> Lists can be comma or whitespace separated...

If Getopt::Long is being used, I believe it permits specifying a switch 
multiple times on the command line and will return an array of values, 
thus avoiding the need to post-process. It makes the command line a tad 
more verbose, but simpler on the coding side.


Mike Tremaine wrote:
> ...we have had a tendency to feature grow the available switches
> and people forgot how to use them all.

One way to lessen this problem is to unify command line switches and 
config file directives into one common namespace, so you only have to 
document things once. With logwatch this may extend to the logwatch.conf 
and maybe the ignore.conf, but probably not to the log file group and 
service file config files.

It also permits easy overriding of conf file option by loading the conf 
file settings into a hash, and then overwriting them with like named 
command line options.

  -Tom

-- 
Tom Metro
Venture Logic, Newton, MA, USA
"Enterprise solutions through open source."
Professional Profile: http://tmetro.venturelogic.com/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.