From 12d1e01d5438cbeaa65901049b4556fa4f8fe0ee Mon Sep 17 00:00:00 2001 From: Shawn Qiu Date: Fri, 17 May 2024 19:31:50 -0700 Subject: [PATCH] import logger --- agentops/worker.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/agentops/worker.py b/agentops/worker.py index f8ce3fb7..233b77f9 100644 --- a/agentops/worker.py +++ b/agentops/worker.py @@ -1,4 +1,5 @@ import json +from .log_config import logger import threading import time from .http_client import HttpClient @@ -6,7 +7,6 @@ from .session import Session from .helpers import safe_serialize, filter_unjsonable from typing import Dict, Optional -import os class Worker: @@ -43,11 +43,10 @@ def flush_queue(self) -> None: serialized_payload, jwt_token=self.jwt) - if self._debug_mode: - print("\n") - print(f"Worker request to {self.config.endpoint}/events") - print(serialized_payload) - print("\n") + logger.debug("\n") + logger.debug(f"Worker request to {self.config.endpoint}/events") + logger.debug(serialized_payload) + logger.debug("\n") def start_session(self, session: Session) -> bool: self._session = session