Skip to content

Commit 2448242

Browse files
committed
fixing circular import
1 parent 9a7965d commit 2448242

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/agentex/lib/utils/logging.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
import ddtrace
88
from ddtrace import tracer
99

10-
from agentex.lib.environment_variables import Environment, EnvironmentVariables
11-
1210
_is_datadog_configured = bool(os.environ.get("DD_AGENT_HOST"))
1311

1412
ctx_var_request_id = contextvars.ContextVar[str]("request_id")
@@ -56,8 +54,8 @@ def make_logger(name: str) -> logging.Logger:
5654
logger = logging.getLogger(name)
5755
logger.setLevel(logging.INFO)
5856

59-
environment_variables = EnvironmentVariables.refresh()
60-
if environment_variables.ENVIRONMENT != Environment.STAGING and environment_variables.ENVIRONMENT != Environment.PROD:
57+
environment = os.getenv("ENVIRONMENT")
58+
if environment == "local":
6159
console = Console()
6260
# Add the RichHandler to the logger to print colored text
6361
handler = RichHandler(

0 commit comments

Comments
 (0)