AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.
Fix "user-friendly" logging
Reinier van der Leer2d400ed16710
diff --git a/autogpt/logs/config.py b/autogpt/logs/config.pyindex b0118be0d3..e7dbab4d0f 100644--- a/autogpt/logs/config.py+++ b/autogpt/logs/config.py@@ -85,7 +85,10 @@ def configure_logging(config: Config, log_dir: Path = LOG_DIR) -> None:typing_console_handler if not config.plain_output else console_handler)user_friendly_output_logger.addHandler(TTSHandler(config))- user_friendly_output_logger.setLevel(logging.DEBUG)+ user_friendly_output_logger.addHandler(activity_log_handler)+ user_friendly_output_logger.addHandler(error_log_handler)+ user_friendly_output_logger.setLevel(logging.INFO)+ user_friendly_output_logger.propagate = False# JSON logger with better formattingjson_logger = logging.getLogger("JSON_LOGGER")diff --git a/autogpt/logs/handlers.py b/autogpt/logs/handlers.pyindex 9d5114ebb3..48af1d2459 100644--- a/autogpt/logs/handlers.py+++ b/autogpt/logs/handlers.py@@ -34,6 +34,8 @@ class TypingConsoleHandler(logging.StreamHandler):self.stream.write(word)self.flush()if i >= len(words) - 1:+ self.stream.write(self.terminator)+ self.flush()breakinterval = random.uniform(min_typing_interval, max_typing_interval)@@ -49,6 +51,7 @@ class TTSHandler(logging.Handler):"""Output messages to the configured TTS engine (if any)"""def __init__(self, config: Config):+ super().__init__()self.config = configdef format(self, record: logging.LogRecord) -> str: