Document utilities

This commit is contained in:
Andras Schmelczer 2022-07-10 19:37:45 +02:00
parent 2b378114aa
commit 00568ca6d3
No known key found for this signature in database
GPG key ID: 0EA1BC97D0AB076E
21 changed files with 371 additions and 29 deletions

View file

@ -1,2 +0,0 @@
from .custom_formatter import CustomFormatter
from .get_logger import get_logger

View file

@ -9,6 +9,8 @@ loggers: Dict[str, logging.Logger] = {}
def get_logger(
name: str, level: int = logging.INFO, disable_colors: bool = False
) -> logging.Logger:
"""Return a customised logger used throughout the GreatAI codebase."""
if name not in loggers:
logger = logging.getLogger(name)
logger.setLevel(level)