Improve binding of loud.
This commit is contained in:
parent
cf4b670f43
commit
2cbb93386e
1 changed files with 5 additions and 1 deletions
|
@ -10,8 +10,12 @@ def getLogger(*args, **kwargs):
|
||||||
return log
|
return log
|
||||||
|
|
||||||
def add_loud(log):
|
def add_loud(log):
|
||||||
|
def loud(self, message, *args, **kwargs):
|
||||||
|
if self.isEnabledFor(LOUD):
|
||||||
|
self._log(LOUD, message, args, **kwargs)
|
||||||
|
|
||||||
addLevelName(LOUD, 'LOUD')
|
addLevelName(LOUD, 'LOUD')
|
||||||
log.loud = lambda *args, **kwargs: log.log(LOUD, *args, **kwargs)
|
log.loud = loud.__get__(log, log.__class__)
|
||||||
|
|
||||||
def get_level_by_argv(argv):
|
def get_level_by_argv(argv):
|
||||||
'''
|
'''
|
||||||
|
|
Loading…
Reference in a new issue