mirror of
https://github.com/Significant-Gravitas/AutoGPT-Code-Ability.git
synced 2026-11-11 00:21:27 -10:00
19 lines
478 B
Python
19 lines
478 B
Python
import logging
|
|
|
|
from codex.common.logging_config import setup_logging
|
|
|
|
|
|
# This is a custom logger that prints the exception stack trace on error by default
|
|
class Logger(logging.Logger):
|
|
def __init__(self, name):
|
|
super().__init__(name)
|
|
|
|
def error(self, msg, *args, **kwargs):
|
|
if not kwargs.get("exc_info"):
|
|
kwargs["exc_info"] = True
|
|
super().error(msg, *args, **kwargs)
|
|
|
|
|
|
# def getLogger(name):
|
|
# return setup_logging(Logger(name))
|