On Fri, May 13, 2005 at 11:04:16PM -0700, Dan Quinlan wrote:
> > I see no way to disable the output of info and above messages.
> > 
> > The default is "info", as set in Logger.pm.  Passing in a facility
> > that isn't "info", or setting multiple facilities, lowers the level to
> > debug.

I must've been looking at an old checkout...  The default at the top of
trunk is actually "debug" now, changed from "info" in r169038.

So it's actually worse, somewhat...   Unless specific facilities are set
(or "all"), nothing is logged for "debug".  So we actually jump through
dbg() into _log(), run a RE against the message to parse some stuff out,
then stop because no facilities are set.  Before, we'd just stop at dbg()
because the default level was set to "info".

> > How can I raise it from info to warning or error?  How do I disable
> > all output if I don't want to see anything?
> 
> a. There are way too many info-level messages.
> b. I'll add an API and options to set the level.

Since we've already overloaded the add_facilities() function to also change
level w/ "info", we could change it so that one can override for all the
levels.  That would make it easier for people to just keep using "-D", but it
does overload the facility API.

I think I've reached the same point JM was at.  ;)

It seems like the breakdown ought to be something like:

dbg             messages only seen with -D, nothing major
info            messages only seen in logs (not STDERR), nothing major
warning         messages logged and seen via STDERR, but processing continues 
(warn)
error           messages logged and seen via STDERR, processing stops (die)

where of course the higher levels include the lower ones (dbg shows all info,
etc.)

That gives a definite difference between info and dbg, but stops the
verboseness of the current info.

FWIW: I've already had users complaining to me about the info output.  They'll
run sa-learn, see some info output saying that a config line can't be parsed,
and think sa-learn failed.  So the new verboseness is going to cause issues.

-- 
Randomly Generated Tagline:
I'm not a bad guy.  I work hard and I love my kids.  So why should I spend
 half my Sunday hearing about how I'm going to Hell?
 
                        -- Homer Simpson
                   Homer the Heretic

Attachment: pgpsYGjbzY7li.pgp
Description: PGP signature

Reply via email to