hhem / crewai /utilities /logger.py
eaglelandsonce's picture
Upload 27 files
94ea28c verified
raw
history blame contribute delete
432 Bytes
class Logger:
def __init__(self, verbose_level=0):
verbose_level = (
2 if isinstance(verbose_level, bool) and verbose_level else verbose_level
)
self.verbose_level = verbose_level
def log(self, level, message):
level_map = {"debug": 1, "info": 2}
if self.verbose_level and level_map.get(level, 0) <= self.verbose_level:
print(f"[{level.upper()}]: {message}")