更改enroll命名,添加了注释,向get_error_msg中添加了一些错误代码
This commit is contained in:
@@ -24,12 +24,6 @@ def configure():
|
||||
format="{message}", style='{', handlers=handlers, level=logging.DEBUG)
|
||||
monkey.patch_func(set_threshold, distutils.log, 'set_threshold')
|
||||
|
||||
# For some reason `distutils.log` module is getting cached in `distutils.dist`
|
||||
# and then loaded again when patched,
|
||||
# implying: id(distutils.log) != id(distutils.dist.log).
|
||||
# Make sure the same module object is used everywhere:
|
||||
distutils.dist.log = distutils.log
|
||||
|
||||
|
||||
def set_threshold(level):
|
||||
logging.root.setLevel(level*10)
|
||||
|
||||
Reference in New Issue
Block a user