Merge pull request 'fix: replace print() with proper logging (#29, #51)' (#59) from fix/print-to-logging into main

This commit is contained in:
rockachopa
2026-03-14 16:34:48 -04:00
2 changed files with 9 additions and 12 deletions

View File

@@ -63,7 +63,7 @@ class EventBus:
@bus.subscribe("agent.task.*")
async def handle_task(event: Event):
print(f"Task event: {event.data}")
logger.debug(f"Task event: {event.data}")
await bus.publish(Event(
type="agent.task.assigned",

View File

@@ -383,17 +383,14 @@ class VoiceLoop:
if self.config.use_say_fallback
else f"Piper ({self.config.piper_voice.name})"
)
print(
f"\n{'=' * 60}\n"
f" 🎙️ Timmy Voice — Sovereign Voice Interface\n"
f"{'=' * 60}\n"
logger.info(
"\n" + "=" * 60 + "\n"
" 🎙️ Timmy Voice — Sovereign Voice Interface\n" + "=" * 60 + "\n"
f" STT: Whisper ({self.config.whisper_model})\n"
f" TTS: {tts_label}\n"
f" LLM: Timmy (local Ollama)\n"
f"{'=' * 60}\n"
f" Speak naturally. Timmy will listen, think, and respond.\n"
f" Press Ctrl-C to exit.\n"
f"{'=' * 60}"
" LLM: Timmy (local Ollama)\n" + "=" * 60 + "\n"
" Speak naturally. Timmy will listen, think, and respond.\n"
" Press Ctrl-C to exit.\n" + "=" * 60
)
self._running = True
@@ -432,7 +429,7 @@ class VoiceLoop:
"goodbye timmy",
"stop listening",
):
print("\n 👋 Goodbye!\n")
logger.info("👋 Goodbye!")
break
# 3. THINK — send to Timmy
@@ -444,7 +441,7 @@ class VoiceLoop:
self._speak(response)
except KeyboardInterrupt:
print("\n\n 👋 Voice loop stopped.\n")
logger.info("👋 Voice loop stopped.")
finally:
self._running = False
self._cleanup_loop()