l.s.s.l.LogLevelNudger : class documentation

Part of lp.services.scripts.logger View In Hierarchy

Callable to adjust the global log level.

Use instances as callbacks for optparse.

Method __init__ Initialize nudger to increment or decrement log level.
Method getIncrement Figure out how much to increment the log level.
Method __call__ Callback for optparse to handle --verbose or --quiet option.
def __init__(self, default, increment=True):
Initialize nudger to increment or decrement log level.
ParametersdefaultDefault starting level.
incrementWhether to increase the log level (as when handling the --verbose option). If not, will decrease instead (as with the --quiet option).
def getIncrement(self, current_level):
Figure out how much to increment the log level.

Increment is negative when decreasing log level, of course.

def __call__(self, option, opt_str, value, parser):
Callback for optparse to handle --verbose or --quiet option.
API Documentation for Launchpad, generated by pydoctor at 2022-06-16 00:00:12.