Use print for debug output

This commit is contained in:
giles
2026-02-02 23:44:34 +00:00
parent cbdae70b66
commit 5bd055f031

View File

@@ -173,12 +173,13 @@ def create_cid_primitives(actor_id: Optional[str] = None):
Returns dict of primitives that resolve CIDs before creating sources. Returns dict of primitives that resolve CIDs before creating sources.
""" """
import sys
def prim_make_video_source_cid(cid: str, fps: float = 30): def prim_make_video_source_cid(cid: str, fps: float = 30):
logger.info(f"CID-aware make-video-source called: cid={cid}, fps={fps}, actor_id={actor_id}") print(f"DEBUG: CID-aware make-video-source called: cid={cid}, fps={fps}, actor_id={actor_id}", file=sys.stderr)
return CIDVideoSource(cid, fps, actor_id) return CIDVideoSource(cid, fps, actor_id)
def prim_make_audio_analyzer_cid(cid: str): def prim_make_audio_analyzer_cid(cid: str):
logger.info(f"CID-aware make-audio-analyzer called: cid={cid}, actor_id={actor_id}") print(f"DEBUG: CID-aware make-audio-analyzer called: cid={cid}, actor_id={actor_id}", file=sys.stderr)
return CIDAudioAnalyzer(cid, actor_id) return CIDAudioAnalyzer(cid, actor_id)
return { return {
@@ -271,10 +272,11 @@ def run_stream(
# Override primitives with CID-aware versions # Override primitives with CID-aware versions
cid_prims = create_cid_primitives(actor_id) cid_prims = create_cid_primitives(actor_id)
logger.info(f"Overriding primitives with CID-aware versions: {list(cid_prims.keys())}") import sys
logger.info(f"Current primitives before update: {list(interp.primitives.keys())[:10]}...") print(f"DEBUG: Overriding primitives with CID-aware versions: {list(cid_prims.keys())}", file=sys.stderr)
print(f"DEBUG: Current primitives before update: {list(interp.primitives.keys())[:10]}...", file=sys.stderr)
interp.primitives.update(cid_prims) interp.primitives.update(cid_prims)
logger.info(f"streaming:make-video-source is now: {interp.primitives.get('streaming:make-video-source')}") print(f"DEBUG: streaming:make-video-source is now: {interp.primitives.get('streaming:make-video-source')}", file=sys.stderr)
# Run rendering to file # Run rendering to file
logger.info(f"Rendering to {output_path}") logger.info(f"Rendering to {output_path}")