Skip to content

Commit

Permalink
import logger
Browse files Browse the repository at this point in the history
  • Loading branch information
siyangqiu committed May 18, 2024
1 parent 23eab50 commit 12d1e01
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions agentops/worker.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import json
from .log_config import logger
import threading
import time
from .http_client import HttpClient
from .config import Configuration
from .session import Session
from .helpers import safe_serialize, filter_unjsonable
from typing import Dict, Optional
import os


class Worker:
Expand Down Expand Up @@ -43,11 +43,10 @@ def flush_queue(self) -> None:
serialized_payload,
jwt_token=self.jwt)

if self._debug_mode:
print("\n<AGENTOPS_DEBUG_OUTPUT>")
print(f"Worker request to {self.config.endpoint}/events")
print(serialized_payload)
print("</AGENTOPS_DEBUG_OUTPUT>\n")
logger.debug("\n<AGENTOPS_DEBUG_OUTPUT>")
logger.debug(f"Worker request to {self.config.endpoint}/events")
logger.debug(serialized_payload)
logger.debug("</AGENTOPS_DEBUG_OUTPUT>\n")

def start_session(self, session: Session) -> bool:
self._session = session
Expand Down

0 comments on commit 12d1e01

Please sign in to comment.