mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2025-07-14 06:50:15 +02:00
Raise an error if get_extension_logger
recieves a non-string argument.
This commit is contained in:
parent
db51abec1f
commit
250cb33285
@ -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')
|
||||
|
Loading…
x
Reference in New Issue
Block a user