Raise an error if get_extension_logger recieves a non-string argument.

This commit is contained in:
Col Crunch 2020-05-26 13:49:06 -04:00
parent db51abec1f
commit 250cb33285

View File

@ -19,6 +19,10 @@ def get_extension_logger(name):
:param: name: the name of the extension doing the logging
:return: an extensions child logger
"""
if not isinstance(name, str):
raise TypeError(f"get_extension_logger takes an argument of type string."
f"Instead received argument of type {type(name).__name__}.")
import logging
parent_logger = logging.getLogger('extensions')