SpiceBot/SpiceBot/SpiceBotCore/logger/__init__.py
deathbybandaid 8d5ac44fee test
2022-02-09 15:38:51 -05:00

19 lines
454 B
Python

from sopel import tools
class Logger():
def __init__(self):
self.logger = tools.get_logger('SpiceBot')
def __getattr__(self, name):
"""
Quick and dirty shortcuts. Will only get called for undefined attributes.
"""
if hasattr(self.logger, name):
return eval("self.logger.%s" % name)
elif hasattr(self.logger, name.lower()):
return eval("self.logger.%s" % name.lower())