Skip to content

Python SDK for AI agent monitoring, LLM cost tracking, benchmarking, and more. Integrates with most LLMs and agent frameworks including CrewAI, Agno, OpenAI Agents SDK, Langchain, Autogen, AG2, and CamelAI

Set file logging to false by default (#661)

Brandon Hancock (bhancock_ai)7219ee87c6aa
diff --git a/agentops/log_config.py b/agentops/log_config.py
index e578a435..584cfb38 100644
--- a/agentops/log_config.py
+++ b/agentops/log_config.py
@@ -43,7 +43,7 @@ class AgentOpsLogFileFormatter(logging.Formatter):
ANSI_ESCAPE_PATTERN = re.compile(r"\x1b\[[0-9;]*m")
-log_to_file = os.environ.get("AGENTOPS_LOGGING_TO_FILE", "True").lower() == "true"
+log_to_file = os.environ.get("AGENTOPS_LOGGING_TO_FILE", "False").lower() == "true"
if log_to_file:
file_handler = logging.FileHandler("agentops.log", mode="w")
file_handler.setLevel(logging.DEBUG)