Prevent peewee debug logging
This commit is contained in:
parent
27cfa81f4e
commit
f2d1967aab
1 changed files with 7 additions and 1 deletions
|
@ -9,6 +9,9 @@ import yaml
|
||||||
from my_project_name.errors import ConfigError
|
from my_project_name.errors import ConfigError
|
||||||
|
|
||||||
logger = logging.getLogger()
|
logger = logging.getLogger()
|
||||||
|
logging.getLogger("peewee").setLevel(
|
||||||
|
logging.INFO
|
||||||
|
) # Prevent debug messages from peewee lib
|
||||||
|
|
||||||
|
|
||||||
class Config(object):
|
class Config(object):
|
||||||
|
@ -99,7 +102,10 @@ class Config(object):
|
||||||
self.command_prefix = self._get_cfg(["command_prefix"], default="!c") + " "
|
self.command_prefix = self._get_cfg(["command_prefix"], default="!c") + " "
|
||||||
|
|
||||||
def _get_cfg(
|
def _get_cfg(
|
||||||
self, path: List[str], default: Any = None, required: bool = True,
|
self,
|
||||||
|
path: List[str],
|
||||||
|
default: Any = None,
|
||||||
|
required: bool = True,
|
||||||
) -> Any:
|
) -> Any:
|
||||||
"""Get a config option from a path and option name, specifying whether it is
|
"""Get a config option from a path and option name, specifying whether it is
|
||||||
required.
|
required.
|
||||||
|
|
Loading…
Reference in a new issue