Skip to content

Commit

Permalink
release/0.7.0: Add range validation
Browse files Browse the repository at this point in the history
  • Loading branch information
nok committed Jan 13, 2019
1 parent 4ab2087 commit 548f306
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions sklearn_porter/utils/Logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ class Logging(object):
@staticmethod
def get_logger(name, level=0):
"""Setup a logging instance"""
level = 0 if not isinstance(level, int) else level
level = 0 if level < 0 else level
level = 4 if level > 4 else level
console = logging.StreamHandler()
level = [logging.NOTSET, logging.ERROR, logging.WARN, logging.INFO,
logging.DEBUG][level]
Expand Down

0 comments on commit 548f306

Please sign in to comment.