Commit 32149978 authored by Jose Tiago Macara Coutinho's avatar Jose Tiago Macara Coutinho Committed by Jose Tiago Macara Coutinho
Browse files

standard: allow to reset log level to initial value

parent 94960883
......@@ -349,6 +349,17 @@ def _check_log_level(level):
rv = getattr(logging, level.upper())
return rv
def set_log_level(level):
def set_log_level(level=logging.root.level):
"""
Adjusts the log level
Without arguments, resets the level back to the one setup at
beginning of the session.
Args:
level (int or str): new log level can be constant (ex: logging.INFO) or
case insensitive equivalent string (ex: 'Info')
"""
logging.root.setLevel(_check_log_level(level))
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment