Log to console with logfire only in development

This commit is contained in:
Yiorgis Gozadinos 2025-12-11 10:47:18 +02:00
parent 5edae13cc0
commit 7ccabf4fb9
No known key found for this signature in database

View file

@ -88,7 +88,11 @@ def main(
try:
import logfire
logfire.configure(send_to_logfire="if-token-present")
is_production = get_config().environment != "development"
logfire.configure(
send_to_logfire="if-token-present",
console=False if is_production else None,
)
logfire.instrument_pydantic_ai()
except Exception:
pass