duplicity-talk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Loglevels and Output ... WAS: Re: [Duplicity-talk] erroneous increme


From: Kenneth Loafman
Subject: Re: Loglevels and Output ... WAS: Re: [Duplicity-talk] erroneous incrementals?
Date: Mon, 30 Mar 2009 08:25:43 -0500
User-agent: Thunderbird 2.0.0.21 (X11/20090318)

Michael Terry wrote:
> On Wed, Mar 25, 2009 at 8:39 AM, Edgar Soldin <address@hidden> wrote:
>> the log level hint might help people familiar with and searching for
>> this term. Of course this makes only sense if the --log-* commands
>> interpret it. Else we should think to differentiate the terms for both
>> outputs (output verbosity vs. log level). Let's see what Michael has to say.
> 
> Sorry, I meant to reply to this, but forgot.
> 
> -log-* commands do respect verbosity setting.
> 
> The list of settings that Ken gave is accurate, but let me explain them a bit:
>    logging.addLevelName(DupToLoggerLevel(0), "ERROR")
>    logging.addLevelName(DupToLoggerLevel(1), "WARNING")
>    logging.addLevelName(DupToLoggerLevel(2), "WARNING")
>    logging.addLevelName(DupToLoggerLevel(3), "NOTICE")
>    logging.addLevelName(DupToLoggerLevel(4), "NOTICE")
>    logging.addLevelName(DupToLoggerLevel(5), "INFO")
>    logging.addLevelName(DupToLoggerLevel(6), "INFO")
>    logging.addLevelName(DupToLoggerLevel(7), "INFO")
>    logging.addLevelName(DupToLoggerLevel(8), "INFO")
>    logging.addLevelName(DupToLoggerLevel(9), "DEBUG")
> 
> In the code, there are standard mappings from log.Error to specific
> levels: 'Error' == 0, 'Warning' == 1, 'Notice' == 3, 'Info' == 5, and
> 'Debug' == 9.  There are duplicate levels per name because some levels
> just didn't have names and I needed something.  Please don't change
> any of these level names without good cause.  This mapping is only for
> log-consuming programs.

I have a louse memory for numbers to levels, so I just made some changes
that make sense to me, as described in this CHANGELOG entry that should
go out in 0.5.14:

=====
Changed from log.Log with numbered log levels to log.Debug,
log.Info, log.Notice, log.Warn, log.FatalError as below:
    0    log.FatalError
    1-2  log.Warn
    3-4  log.Notice
    5-8  log.Info
    9 log.Debug
The -vN option has not changed.  It is suggested that you
run at log level 3, Notice.  Info and Debug are verbose.
=====

To me, these log levels make sense.  I'd like to change the -vN option
as well, but left it.  I'm thinking it should accept both numeric and
symbolic names, at least for a while, something like -vI[NFO] where only
the first character is required.

What do you think?  Will this break anything, or will it make life
easier?  I know that for me it will make programming easier since I've
got symbolic names now.  It's in CVS so you can check it out.

...Ken

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]