Re: Patch to avoid lowercasing logfile paths
"MrC" <[email protected]>
| Newsgroups | gmane.comp.log.logwatch.devel |
|---|---|
| Message-ID | <006701c788f5$36e59890$0a02a8c0@yellowstone> |
> -----Original Message-----
> From: Kirk Bauer
> Sent: Friday, April 27, 2007 6:34 AM
> Subject: Re: [Logwatch-Devel] Patch to avoid lowercasing logfile paths
>
> That was my fault. Early on I felt that case-insensitive
> config files are more user-friendly. I have long ago added
> support for double-quotes that can be used to protect values
> from being lower-cased.
I agree, for variable names, but never paths. From the history log, I can
see you updated this back in version 3'ish. I couldn't find this feature
documented elsewhere.
So where do we want to go with this? I will propose:
a) pathnames outside logwatch's control (eg: Logfile, Archive) are never
case-converted. *Services might be ok, because they are generally part of
the release, in those services are installed in well-known paths that are
all lowercase paths.
b) Update the incorrect comment "Everything is case *insensitive*" from the
config files, and include documentation that indicates quotes will protect
case-sensitivity.
Do double quotes protect variable names in config files too ? ( I had
posted some issue last year about config vars and case-sensitivity;
double-quotes were not mentioned then, so I figured a workaround).
MrC
>
> On 4/26/07, MrC wrote:
> > Hi folks,
> >
> > Below is a patch to prevent lower-casing pathnames values
> for Logfile
> > variables in logwatch's config files. I've been bitten
> several times
> > now when I use paths such as:
> >
> > Logfile = /home/dir/Logs
> >
> > Logwatch lowercases the path to /home/dir/logs, and of course since
> > that path does not exist, logwatch happily ignores the nonexistent
> > logfile, exiting without a trace of info as to why no output was
> > produced (even at debug 10).
> >
> > It seems fundamentally wrong for logwatch to treat paths in a
> > case-insensitive manner, when the *nix file systems are
> case-sensitive.
> >
> > Does anyone disagree with this?
> >
> > --- logwatch.pl 2007-04-26 20:50:46.000000000 -0700
> > +++ logwatch.pl.patched 2007-04-26 20:50:44.000000000 -0700
> > @@ -255,7 +255,7 @@
> > else { $value = ''; }
> >
> > push @ReadConfigNames, lc $name;
> > - push @ReadConfigValues, getInt $value;
> > + push @ReadConfigValues, $name =~ /^logfile$/i ?
> $value : getInt
> > $value;
> > if ($Config{'debug'} > 7) {
> > print "ReadConfigFile: Name=" . $name . ",
> Value=" . $value .
> > "\n";