---
id: TASK-20.3
title: >-
  Add logging to command handlers
  (clean/configure/build/flash/run/list/boards/runners/profiles)
status: Done
assignee:
  - codex
created_date: '2026-02-27 11:46'
updated_date: '2026-02-27 11:58'
labels: []
dependencies: []
references:
  - docs/zync/lua/zync/api/manager.lua
  - src/core/cmd.rs
parent_task_id: TASK-20
---

## Description

<!-- SECTION:DESCRIPTION:BEGIN -->
Add log messages in command handlers matching zync’s manager.lua behavior (e.g., 'Cleaning build directory', 'Configuring sysbuild project', 'Building project', 'Listing sysbuild images', sysbuild list/image option errors, 'Flashing sysbuild image: X', 'Running sysbuild image: X', boards/runners/profiles listing messages, and missing ZEPHYR_BASE hints). Ensure message text aligns closely with zync.
<!-- SECTION:DESCRIPTION:END -->

## Acceptance Criteria
<!-- AC:BEGIN -->
- [x] #1 Each command handler emits the expected log message(s) at the same points as zync
- [x] #2 Sysbuild-specific messages are emitted conditionally (list/image only for sysbuild, resolve failures logged)
- [x] #3 Any behavior differences are documented in task notes for review
<!-- AC:END -->

## Implementation Plan

<!-- SECTION:PLAN:BEGIN -->
- Map zync’s manager.lua logging points to Kaze command handlers.
- Add `core::log::info` calls for clean/configure/build/flash/run/list/boards/runners/profiles, plus sysbuild list/image errors and resolve failures.
- Keep message text aligned with zync where possible; note any necessary differences.
- Run `just check`.
<!-- SECTION:PLAN:END -->

## Implementation Notes

<!-- SECTION:NOTES:BEGIN -->
Added log messages to command handlers for clean/configure/build/flash/run/list/boards/runners/profiles and sysbuild list/image error paths; sysbuild image selection logs now mirror zync. Difference: Kaze runners log targets missing `runners.yaml` in build dir (zync logs missing ZEPHYR_BASE). `just check` passes.
<!-- SECTION:NOTES:END -->

## Final Summary

<!-- SECTION:FINAL_SUMMARY:BEGIN -->
Added logging across command handlers to mirror zync: clean/configure/build/flash/run/list/boards/runners/profiles, sysbuild list/image errors, and sysbuild image selection logs. Noted difference: runners failure logs refer to missing `runners.yaml` rather than ZEPHYR_BASE. Tests: `just check`.
<!-- SECTION:FINAL_SUMMARY:END -->
