Prevent peewee debug logging

This commit is contained in:
Andrew Morgan 2021-01-03 23:34:56 -05:00
parent 27cfa81f4e
commit f2d1967aab

View file

@ -9,6 +9,9 @@ import yaml
from my_project_name.errors import ConfigError
logger = logging.getLogger()
logging.getLogger("peewee").setLevel(
logging.INFO
) # Prevent debug messages from peewee lib
class Config(object):
@ -99,7 +102,10 @@ class Config(object):
self.command_prefix = self._get_cfg(["command_prefix"], default="!c") + " "
def _get_cfg(
self, path: List[str], default: Any = None, required: bool = True,
self,
path: List[str],
default: Any = None,
required: bool = True,
) -> Any:
"""Get a config option from a path and option name, specifying whether it is
required.