Skip to content

Commit 058c70e

Browse files
Fix print statements in Jinja template
- Updated temporal ACP template to use logger instead of print for debug output - This will fix generated files to have proper logging practices
1 parent 5110dc8 commit 058c70e

File tree

1 file changed

+11
-8
lines changed
  • src/agentex/lib/cli/templates/temporal/project

1 file changed

+11
-8
lines changed

β€Žsrc/agentex/lib/cli/templates/temporal/project/acp.py.j2β€Ž

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,26 @@ import sys
55
if os.getenv("AGENTEX_DEBUG_ENABLED") == "true":
66
try:
77
import debugpy
8+
from agentex.lib.utils.logging import make_logger
9+
10+
logger = make_logger(__name__)
811
debug_port = int(os.getenv("AGENTEX_DEBUG_PORT", "5679"))
912
debug_type = os.getenv("AGENTEX_DEBUG_TYPE", "acp")
1013
wait_for_attach = os.getenv("AGENTEX_DEBUG_WAIT_FOR_ATTACH", "false").lower() == "true"
11-
14+
1215
# Configure debugpy
1316
debugpy.configure(subProcess=False)
1417
debugpy.listen(debug_port)
15-
16-
print(f"πŸ› [{debug_type.upper()}] Debug server listening on port {debug_port}")
17-
18+
19+
logger.info(f"πŸ› [{debug_type.upper()}] Debug server listening on port {debug_port}")
20+
1821
if wait_for_attach:
19-
print(f"⏳ [{debug_type.upper()}] Waiting for debugger to attach...")
22+
logger.info(f"⏳ [{debug_type.upper()}] Waiting for debugger to attach...")
2023
debugpy.wait_for_client()
21-
print(f"βœ… [{debug_type.upper()}] Debugger attached!")
24+
logger.info(f"βœ… [{debug_type.upper()}] Debugger attached!")
2225
else:
23-
print(f"πŸ“‘ [{debug_type.upper()}] Ready for debugger attachment")
24-
26+
logger.info(f"πŸ“‘ [{debug_type.upper()}] Ready for debugger attachment")
27+
2528
except ImportError:
2629
print("❌ debugpy not available. Install with: pip install debugpy")
2730
sys.exit(1)

0 commit comments

Comments
Β (0)